Last active
January 30, 2020 21:11
-
-
Save rampatra/a8650fd2ce43b7b1fb89bffa94ead603 to your computer and use it in GitHub Desktop.
Fetching all jekyll posts in a json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: null | |
--- | |
[ | |
{% for post in site.posts %} | |
{ | |
"title" : "{{ post.title }}", | |
"url" : "{{ post.url }}", | |
"date" : "{{ post.date | date: "%B %d, %Y" }}", | |
"content" : "{{ post.content | strip | strip_html | strip_newlines | replace: '"', '' | slice: 0, 600 }}" | |
}{% if forloop.last %}{% else %},{% endif %} | |
{% endfor %} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment