Skip to content

liquid-utilities/collection-home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Liquid Collection Home

Liquid layout that builds list of pages within named collection

Byte size of collection-home.html Open Issues Open Pull Requests Latest commits Collection Home Demos


Table of Contents


Quick Start

Bash Variables

_module_name='collection-home'
_module_https_url="https://github.com/liquid-utilities/${_module_name}.git"
_module_relative_path="_layouts/modules/${_module_name}"

Bash Submodule Commands

cd "<your-git-project-path>"

git checkout gh-pages
mkdir -vp "_layouts/modules"

git submodule add\
 -b master --name "${_module_name}"\
 "${_module_https_url}" "${_module_relative_path}"

Your ReadMe File

Suggested additions for your ReadMe.md file so everyone has a good time with submodules

Clone with the following to avoid incomplete downloads


    git clone --recurse-submodules <url-for-your-project>


Update/upgrade submodules via


    git submodule update --init --merge --recursive

Utilize Collection Home

_your_collection/index.md

---
layout: modules/collection-home/collection-home
title: Your Collection
collection_name: your_collection
list_title: Pages available within Your Collection
---

## Collection Home list content


> This text will be compiled and rendered
> prior to list of collection pages!

Additionally targeting by collection name enables...

your_collection.md

---
layout: modules/collection-home/collection-home
title: Your Collection
collection_name: your_collection
list_title: Pages available within Your Collection
---

... meaning that collection homes may be placed anywhere!

Each collection page should contain the following FrontMatter...

_your_collection/something-collected.md

## Layout maybe `post` or really any available layout
layout: page
title: Title for an individual post
date: 2019-07-21 11:42:11 -0300
description: Example collection page about something

Commit and Push

git add .gitmodules
git add _layouts/modules/collection-home


## Add any changed files too


git commit -F- <<'EOF'
:heavy_plus_sign: Adds `liquid-utilities/collection-home#1` submodule



**Additions**


- `.gitmodules`, tracks submodules AKA Git within Git _fanciness_

- `README.md`, updates installation and updating guidance

- `_layouts/modules/collection-home`, builds list of pages for a named collection
EOF


git push origin gh-pages

🎉 Excellent 🎉 your site is now ready to begin unitizing code from this repository!


Notes

This layout is written to operate without modifications if utilizing the Minima (default Jekyll) theme, otherwise edits are currently required icon lines...

<use xlink:href="{{ '/assets/minima-social-icons.svg#rss' | relative_url }}"></use>

... In the future this theme may make an attempt to detect and auto link for themes available on GitHub Pages.

Permalinks and underscore (_) generally are sluggified such that file_name.md transmutes into something like file-name.html


Timezone offsets also require that timezone is set within the site _config.yml file; check Wikipedia -- List of tz database time zones for mapping hints, eg...

_config.yml snip...

timezone: America/Los_Angeles

_your_collection/something-collected.md snip...

date: 2019-07-21 11:42:11 -0800

... if timezone is not defined then built HTML documents will default to an offset of 0000 which will cause both the date (day) and time (hour) to be recalculated.


License

Legal bits of Open Source software

Collection Home ReadMe documenting how things like this could be utilized
Copyright (C) 2024  S0AndS0

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.