Skip to content

Instantly share code, notes, and snippets.

@manbearwolf
Last active November 16, 2017 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manbearwolf/657768d75cf3c0d0576757c17cd94721 to your computer and use it in GitHub Desktop.
Save manbearwolf/657768d75cf3c0d0576757c17cd94721 to your computer and use it in GitHub Desktop.
Simple Jekyll Search JSON Setup
---
layout: null
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title | escape }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"tags" : "{{ post.tags | join: ', ' }}",
"date" : "{{ post.date }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]
@manbearwolf
Copy link
Author

to draw in jekyll (needs raw or won't render correctly)

{% highlight json %}
{% raw %}
{% endraw %}
{% endhighlight %}

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