Skip to content

Instantly share code, notes, and snippets.

@natelandau
Created May 20, 2017 18:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natelandau/7e17b657ed7ac0115480525918e4ff73 to your computer and use it in GitHub Desktop.
Save natelandau/7e17b657ed7ac0115480525918e4ff73 to your computer and use it in GitHub Desktop.
---
layout: null
---
{
"version": "https://jsonfeed.org/version/1",
"title": {{ site.name | jsonify }},
"home_page_url": "{{ site.baseurl }}/",
"feed_url": "{{ site.baseurl }}/feed.json",
"description": {{ site.tagline | jsonify }},
"favicon": "{{ site.baseurl }}/assets/icons/favicon-96x96.png",
"icon": "{{ site.baseurl }}/assets/icons/apple-touch-icon.png",
"author": {
"name": {{ site.author.name | jsonify }},
"url": "{{ site.baseurl }}/",
},
"expired": "false",
"items": [
{% for post in site.posts limit:15 %}
{
"id": "{{ post.id }}",
"url": "{{ site.baseurl }}{{ post.url }}?utm_source=jsonFeed&utm_medium=jsonFeed&utm_campaign={{ post.title | replace: ',','' | replace: ' ', '' | handleize | xml_escape }}",
"title": {{ post.title | jsonify }},
"content_html": {{ post.content | jsonify }},
{% if post.description %}"summary": {{ post.description | jsonify }},{% endif %}
{% if post.tags %}"tags": [ "{{post.tags | join: '","'}}" ],{% endif %}
{% if post.linkURL %}"external_url": "{{ post.linkURL }}",{% endif %}
"date_published": "{{ post.date | date_to_xmlschema }}",
"date_modified": "{% if post.sitemap.lastmod == null %}{{ post.date | date_to_xmlschema }}{% else %}{{ post.sitemap.lastmod | date_to_xmlschema }}{% endif %}"
}{% unless forloop.last == true %},{% endunless %}
{% endfor %}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment