-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
16 lines (16 loc) · 1.98 KB
/
search.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
layout: none
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title | escape }}",
"category" : "{{ post.category }}",
"tags" : "{{ post.tags | array_to_sentence_string }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date | date: '%b %-d, %Y' }}",
"content" : "{{ post.content | strip_html | strip_newlines | escape }}",
"article" : "<div class='article col col-4 col-d-6 col-t-12 grid__post animate'> <div class='article__inner'>{% if post.image %}<a class='article__image' href='{{ post.url | prepend: site.baseurl }}'> <img src='{{ site.baseurl }}{{ post.image }}' alt='{{ post.title | escape }}'> </a>{% endif %}<div class='article__content'> <div class='article__meta'> <span class='article__minutes'>{% assign words=post.content | number_of_words %}{% if words < 360 %}1 min read{% else %}{{words | divided_by:180}} min read{% endif %} <time class='article__date' datetime='{{ post.date | date_to_xmlschema }}'>{% assign date_format=site.minima.date_format | default: '%b %-d, %Y' %}{{ post.date | date: date_format }}</time> </span> </div><h2 class='article__title'>{{ post.title | escape }}</h2> <p class='article__excerpt'>{{ post.description | escape }}</p><div class='article__bottom'>{% if site.author.avatar %}<div class='article__author'> <a href='{{ site.baseurl }}/about/' aria-label='{{ site.author.name }}'><img class='article__author-image' src='{{ site.baseurl }}{{ site.author.avatar }}' alt='{{ site.author.name }}'s Picture'></a> </div>{% endif %}<div class='article__bottom-meta'>{% if site.author.name %}<a href='{{ site.baseurl }}/about/' class='article__author-link'>{{ site.author.name }}</a>{% endif %}{% if post.tags.size >=1 %}<span> in </span> <span class='article-tags'>{% for tag in post.tags %} <a href='{{ site.baseurl }}/tag/{{ tag }}' class='article__tag'>{{ tag }}</a> {% endfor %}</span>{% endif %}</div></div></div></div></div>"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]