Instantly share code, notes, and snippets.

@zhuochun /README.md
Last active Aug 10, 2018

Embed
What would you like to do?
List all posts, tags and categories in Jekyll. https://github.com/zhuochun/md-writer

Markdown-Writer for Atom

List all posts, tags and categories in Jekyll.

Octopress users: if you found " is escaped in the generated JSON file, please change them to \". Refer to this issue.

---
layout: null
---
{
"categories": [
{% for category in site.categories %}
"{{ category | first }}"{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
---
layout: null
---
{
"posts": [
{% for post in site.posts %}
{
"title": "{{ post.title | xml_escape }}",
"url": "{{ site.url }}{{ post.url }}",
"date": "{{ post.date | date_to_xmlschema }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
---
layout: null
---
{
"tags": [
{% for tag in site.tags %}
"{{ tag | first }}"{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}
@mautematico

This comment has been minimized.

Show comment
Hide comment
@mautematico

mautematico Feb 19, 2016

Thank you very much!

mautematico commented Feb 19, 2016

Thank you very much!

@JerryChin

This comment has been minimized.

Show comment
Hide comment
@JerryChin

JerryChin Jul 3, 2017

That's very helpful!

JerryChin commented Jul 3, 2017

That's very helpful!

@MichaelOrtho

This comment has been minimized.

Show comment
Hide comment
@MichaelOrtho

MichaelOrtho May 13, 2018

Thank you, very helpful!

MichaelOrtho commented May 13, 2018

Thank you, very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment