Skip to content

Instantly share code, notes, and snippets.

@miyaoka
Last active December 18, 2017 20:14
Show Gist options
  • Save miyaoka/9190c03d541b544043787cb8f7229deb to your computer and use it in GitHub Desktop.
Save miyaoka/9190c03d541b544043787cb8f7229deb to your computer and use it in GitHub Desktop.
rawPosts: [
{% for post in site.posts %}
{% capture desc %}{% include post_description.inc post=post %}{% endcapture %}
{
"url": {{ post.url | jsonify }},
"title": {{ post.title | jsonify }},
"actors": [
{% for actor_id in post.actor_ids %}
{
{% assign actor = site.actors | where:"actor_id", actor_id | first %}
"title": {{ actor.title | jsonify }},
"image_url": {{ actor.image_url | jsonify }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
],
"topics": {{ post.topics | jsonify }},
"description": {{ desc | jsonify }},
"date": {{ post.date | jsonify }},
"content": {{ post.content | strip_html | jsonify }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment