-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathsite.json
More file actions
28 lines (28 loc) · 979 Bytes
/
site.json
File metadata and controls
28 lines (28 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
---
[
{% for post in site.posts %}
{% assign lineCount = 0 %}
{% assign lines = post.content | strip_html | newline_to_br | split: '<br />' %}
{% for line in lines %}
{% assign line = line | strip %}
{% assign charCount = line | size %}
{% assign pLines = charCount | divided_by: 85 | plus: 1 %}
{% assign lineCount = lineCount | plus: pLines %}
{% endfor %}
{% assign pageCount = lineCount | divided_by: 50 | plus: 1 %}
{
"title": {{ post.title | jsonify }},
"categories": {{ post.categories | jsonify }},
"url": {{ post.url | jsonify }},
"thumbnail": {{ post.thumbnail | jsonify }},
"tagline": {{ post.tagline | jsonify }},
"metaTitle": {{ post.meta-title | jsonify }},
"metaDescription": {{ post.meta-description | jsonify }},
"metaImage": {{ post.meta-image | jsonify }},
"tags": {{ post.tags | jsonify }},
"date": {{ post.date | jsonify }},
"printedPages": {{ pageCount }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]