forked from omgmog/omgmog.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathposts.json
More file actions
38 lines (38 loc) · 1.24 KB
/
posts.json
File metadata and controls
38 lines (38 loc) · 1.24 KB
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
29
30
31
32
33
34
35
36
37
38
---
---
{% assign limit = 5 %}
{
"featured-posts": [
{% assign featured_posts = (site.posts | where:'featured','true') %}
{% for post in featured_posts limit:limit %}
{
"published": "{{ post.date | date_to_long_string }}",
"title": "{{ post.title | strip_html | escape }}",
"link": "{{ site.baseurl }}{{ post.url }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
],
"recent-posts": [
{% assign recent_posts = site.posts %}
{% for post in recent_posts limit:limit %}
{
"published": "{{ post.date | date_to_long_string }}",
"title": "{{ post.title | strip_html | escape }}",
"link": "{{ site.baseurl }}{{ post.url }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
],
"recent-reviews": [
{% assign reviews = (site.posts | where:'category','hardware-review') %}
{% for post in reviews limit:limit %}
{
"published": "{{ post.date | date_to_long_string }}",
"title": "{{ post.title | strip_html | escape }}",
"link": "{{ site.baseurl }}{{ post.url }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}