Skip to content

Instantly share code, notes, and snippets.

@jennifert

jennifert/searchjson

Created May 23, 2015
Embed
What would you like to do?
Also grabbed form my github repor for easy embed to site.
---
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title }}",
"href" : "{{ post.url }}",
"summary" : "{{ post.content | strip_html | strip_newlines | truncatewords: 30 | escape }}",
"category" : [{% for category in post.categories %}"{{ category }}",{% endfor %} null],
"tags" : [{% for tag in post.tags %}"{{ tag }}",{% endfor %} null],
"date" : "{{ post.date | date: "%b %-d, %Y" }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment