forked from AtiusAmy/atiusamy.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
executable file
·36 lines (31 loc) · 987 Bytes
/
search.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
34
35
36
---
layout: none
---
[
{% for post in site.posts %}
{% if site.authors[post.author].name %}
{% assign author=site.authors[post.author] %}
{% else %}
{% assign author=site.authors["anonymous"] %}
{% endif %}
{% unless post.hidden %}
{
"title": "{{ post.title | escape }}",
{% if post.description %}
"description": "{{ post.description | escape }}",
{% else %}
"description": "{{ post.date | date: "%a, %b %e, %Y" }}",
{% endif %}
"content": {{ post.content | jsonify }},
{% if post.image %}
"image": "{{ post.image }}",
{% else %}
"image": "https://www.gravatar.com/avatar/{{ author.gravatar }}?s=84&d=blank",
{% endif %}
"url": "{{ site.baseurl }}{{ post.url }}",
"tags": "{{ post.tags | join: ', ' }}",
"date": "{{ post.date }}"
} {% unless forloop.last%}, {% endunless %}
{% endunless %}
{% endfor %}
]