https://github.com/georgemandis/jekyll-json-feeds
Templates for rendering JSON feeds for your Jekyll blog
https://github.com/georgemandis/jekyll-json-feeds
jekyll jekyll-blog json json-feed
Last synced: 8 months ago
JSON representation
Templates for rendering JSON feeds for your Jekyll blog
- Host: GitHub
- URL: https://github.com/georgemandis/jekyll-json-feeds
- Owner: georgemandis
- License: mit
- Created: 2017-05-22T22:56:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-31T17:13:33.000Z (over 7 years ago)
- Last Synced: 2025-04-07T10:35:41.288Z (9 months ago)
- Topics: jekyll, jekyll-blog, json, json-feed
- Homepage: http://snaptortoise.com/open-source.html
- Size: 3.91 KB
- Stars: 31
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Jekyll JSON Feed Templates
=========================
A few Liquid templates to use for rendering JSON feeds for your Jekyll blog in keeping with the [JSONFeed spec](https://jsonfeed.org/). Like it's sister project [jekyll-rss-feeds](https://github.com/snaptortoise/jekyll-rss-feeds), it features a number of kinds of feeds:
- **feed.json** — Renders the 10 most recent posts.
- **feed.category.json** — Only renders posts for a specific category. This example renders posts for a "miscellaneous" category.
- **feed.tag.json** — Only renders posts for a specific tag. This example renders posts for a "jekyll" category.
- **feed.links.json** — Only contains posts that link to external websites noted by a link variable in the [YAML Front Matter](https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter). Not a common Jekyll convention, but a good way to generating a linked list.
- **feed.articles.json** — Only showing articles that don't link to external sites; The opposite of feed.links.json
How to use
----------
- Update \_config.yml as noted below, or manually replace the variables.
- Copy one of the JSON (ie, feed.json) 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.json.
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
author: Your Name (optional)
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.
## Looking for the RSS version?
If you missed the link at the top please also checkout the original incarnation of this project:
[github.com/snaptortoise/jekyll-rss-feeds](https://github.com/snaptortoise/jekyll-rss-feeds)