forked from bhavyaagg/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.json
executable file
·33 lines (32 loc) · 1.03 KB
/
feed.json
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
---
layout: null
---
{% assign first = true %}
[
{% for post in site.posts %}
{% if post.title != null and post.title != empty %}
{% unless first %},{% endunless %}{
"title": {{post.title | jsonify}},
"content": {{post.content | markdownify | strip_html | jsonify}},
"link": "{{ site.baseurl }}{{ post.url }}",
"date": "{{ post.date }}",
"excerpt": "{{ post.snippet }}",
"search_omit": "{{ post.search_omit }}"
}
{% assign first = false %}
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.title != null and page.title != empty %}
{% unless first %},{% endunless %}{
"title": {{page.title | jsonify}},
"content": {{page.content | strip_html | jsonify}},
"link": "{{ site.baseurl }}{{ page.url | replace: 'index.html', '' }}",
"date": {{ page.date | jsonify }},
"excerpt": {{ page.description | jsonify }},
"search_omit": "{{ page.search_omit }}"
}
{% assign first = false %}
{% endif %}
{% endfor %}
]