Skip to content

liquid-utilities/feed-rss2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Liquid Feed RSS2

Liquid layout that builds RSS2 feeds from Jekyll collections via FrontMatter configurations

Byte size of feed-rss2.html Open Issues Open Pull Requests Latest commits Feed RSS2 Demos


Table of Contents


Quick Start

Bash Variables

_module_name='feed-rss2'
_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 --remote

Utilize Feed RSS2

Assign site.url, either via command line Jekyll build/serve command line option or with the following _config.yml configuration...

url: "http://example.com"

Note, a full example _config.yml file is available within the gh-pages branch of this repository.

Each collection page should have FrontMatter definitions similar to...

---
title: Title of Page
date: 2019-04-17 11:12:11 -0300
#date_updated:  # Optional and formatted like `date` above
description: A description of page content
#excerpt: Or a snippet about this page
## Following is optional and in this example case would allow
##  for embedding CSV data within `content` tags, defaults to `html`
#content_type: 'text/delimited'
time_to_live: 1800  # Number of seconds till update is recommended
---

Note, excerpt requires site.show_excerpts to be non-false and not setting a description for those pages using excerpts

An example page raw source is available within the gh-pages branch of this repository.

Each collection directory should have a feed.rss file sorta like...

---
layout: modules/feed-rss2/feed-rss2
title: Example Collection
collection_name: example-collection
collection_home: /example-collection/
date: 2019-07-23 21:12:13 -0700
content_type: xhtml
permalink: /:collection/:name:output_ext
---

Note, RSS feed example file is available within the gh-pages branch of this repository.

This layout utilizes the GitHub MetaData plugin, please enable within the following configuration files to avoid build errors popping because of code from this repository...

_config.yml

plugins:
  - jekyll-github-metadata

Gemfile

# gem "jekyll", "~> 3.8.5"
gem "github-pages", group: :jekyll_plugins

gem "jekyll-github-metadata"

Commit and Push

git add .gitmodules
git add _layouts/feed-rss2


## Add any changed files too


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



**Additions**


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

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

- `_layouts/feed-rss2`, builds RSS2 feeds via FrontMatter configurations
EOF


git push origin gh-pages

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


Attribution

Resources that where helpful in building this project so far


License

Legal bits of Open Source software

Feed RSS2 ReadMe documenting how things like this could be utilized
Copyright (C) 2019  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/>.