Giter Site home page Giter Site logo

reeddunkle / jekyll-rss-feeds Goto Github PK

View Code? Open in Web Editor NEW

This project forked from georgemandis/jekyll-rss-feeds

0.0 2.0 0.0 23 KB

Templates for rendering RSS feeds for your Jekyll blog

Home Page: http://snaptortoise.com/open-source.html

License: MIT License

jekyll-rss-feeds's Introduction

Jekyll RSS Feed Templates

A few Liquid templates to use for rendering RSS feeds for your Jekyll blog. Featuring four kinds of feeds:

  • feed.xml — Renders the 10 most recent posts.
  • feed.category.xml — Only renders posts for a specific category. This example renders posts for a "miscellaneous" category.
  • feed.links.xml — Only contains posts that link to external websites noted by a link variable in the YAML Front Matter. Not a common Jekyll convention, but a good way to generating a linked list.
  • feed.articles.xml — Only showing articles that don't link to external sites; The opposite of feed.links.xml

How to use

  • Update _config.yml as noted below, or manually replace the variables.
  • Copy one of the xml (ie, feed.xml) files to the root directory of your Jekyll blog.
  • Run jekyll.

In your generated _site folder you should find a properly formatted feed at feed.xml.

Customizing _config.yml

These templates rely on a customized version of _config.yml. The following lines have been added:

name: Your Blog's Name
description: A description for your blog
url: http://your-blog-url.example.com

This makes it easy to reference the title, description and URL for your site in the feed templates using {{ site.name }}, {{ site.description }} and {{ site.url }}. Even if you're not using these feed templates, you might find these variables useful when you're designing your layouts.

Miscellany

  • Note on YAML Front Matter block: The xml files contain an empty YAML Front Matter block. This is necessary because Jekyll will not process a page with Liquid unless there is a YAML block at the top of the file. Previously, this block contained the line layout: none but that was found to cause a separate issue for some: https://github.com/snaptortoise/jekyll-rss-feeds/commit/209b83b504fde14722491ea5d9753189566c8598

  • RSS Autodiscovery: If your template is not already setup to do so, make sure the RSS feeds are discoverable by browsers, bots, etc. by providing proper link tags to your Jekyll layout files (adapt href and title appropriately):

      <link href="/blog/feed.xml" type="application/rss+xml" rel="alternate" title="Latest 10 blog posts (atom)" />
    

    Refer to rssboard.org/rss-autodiscovery for details.

  • Validation: You can use the W3C Validator to make sure your feeds are formatted correctly: http://validator.w3.org/feed/

jekyll-rss-feeds's People

Contributors

georgemandis avatar integrii avatar nickcotton avatar dsernst avatar jclgoodwin avatar paulroho avatar tanner avatar hizzgdev avatar

Watchers

James Cloos avatar Reed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.