diff options
Diffstat (limited to '')
-rw-r--r-- | site.json | 67 |
1 files changed, 43 insertions, 24 deletions
@@ -1,14 +1,33 @@ --- --- { - "posts": [ - {% assign filtered_posts = "" | split:"" %} - {% for post in site.posts %} + "pages": [ + {% assign filtered_pages = "" | split:"" %} + {% for page in site.pages %} + {% unless page.plaintext %} + {% assign filtered_pages = filtered_pages | push:page %} + {% endunless %} + {% endfor %} + {% for page in filtered_pages %} + { + "title": "{{ page.title | smartify }}", + "url": "{{ page.url }}", + "lang": "{{ page.lang }}", + "ref": "{{ page.ref }}", + "plaintext": "{{ page.plaintext }}", + "layout": "{{ page.layout }}", + "content": {{ page.content | strip_html | jsonify }} + }{% unless forloop.last %},{% endunless %} + {% endfor %} + ], + "articles": [ + {% assign filtered_articles = "" | split:"" %} + {% for post in site.articles %} {% unless post.plaintext %} - {% assign filtered_posts = filtered_posts | push:post %} + {% assign filtered_articles = filtered_articles | push:post %} {% endunless %} {% endfor %} - {% for post in filtered_posts %} + {% for post in filtered_articles %} { "title": "{{ post.title | smartify }}", "date": "{{ post.date }}", @@ -20,25 +39,6 @@ }{% unless forloop.last %},{% endunless %} {% endfor %} ], - "pages": [ - {% assign filtered_pages = "" | split:"" %} - {% for page in site.pages %} - {% unless page.plaintext %} - {% assign filtered_pages = filtered_pages | push:page %} - {% endunless %} - {% endfor %} - {% for page in filtered_pages %} - { - "title": "{{ page.title | smartify }}", - "url": "{{ page.url }}", - "lang": "{{ page.lang }}", - "ref": "{{ page.ref }}", - "plaintext": "{{ page.plaintext }}", - "layout": "{{ page.layout }}", - "content": {{ page.content | strip_html | jsonify }} - }{% unless forloop.last %},{% endunless %} - {% endfor %} - ], "pastebins": [ {% assign filtered_pastebins = "" | split:"" %} {% for pastebin in site.pastebins %} @@ -76,5 +76,24 @@ "content": {{ til.content | strip_html | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} + ], + "slides": [ + {% assign filtered_slides = "" | split:"" %} + {% for slide in site.data.slides %} + {% unless slide.plaintext %} + {% assign filtered_slides = filtered_slides | push:slide %} + {% endunless %} + {% endfor %} + {% for slide in site.slides %} + { + "title": "{{ slide.title | smartify }}", + "date": "{{ slide.date }}", + "url": "{{ slide.url }}", + "lang": "{{ slide.lang }}", + "ref": "{{ slide.ref }}", + "layout": "{{ slide.layout }}", + "content": {{ slide.content | strip_html | jsonify }} + }{% unless forloop.last %},{% endunless %} + {% endfor %} ] } |