-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
15 lines (15 loc) · 1.92 KB
/
search.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
layout: null
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title | escape }}",
"article" : "<div class='article col col-4 col-d-6 col-t-12 col-m-12 grid__post animate'>{% if post.image %}<a class='article__image' href='{{post.url | prepend: site.baseurl}}'> <img src='{{site.baseurl}}{{post.image}}' alt='{{post.title}}'> </a>{% endif %}<div class='article__content'> <div class='article__meta'> <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> <div class='article-tags'>{% if post.tags.size >=1 %}<div class='article-tags__box'>{% for tag in post.tags %}<a href='{{site.baseurl}}/tag/{{tag}}' class='article__tag'>{{tag}}</a>{% endfor %}</div>{% else %}{% endif %}</div></div><h2 class='article__title'> <a href='{{post.url | prepend: site.baseurl}}'>{{post.title}}</a> </h2> <p class='article__excerpt'>{% if post.description %}{{post.description}}{% else %}{{post.content | strip_html | truncate: 110}}{% endif %}</p><div class='article__bottom'> <div class='article__author'>{% if site.author.avatar %}<a href='{{site.baseurl}}/author/' class='article__author-image' aria-label='{{site.author.name}}'s Picture'><img src='{{site.baseurl}}{{site.author.avatar}}' alt='{{site.author.name}}'s Picture'></a>{% endif %}<a href='{{site.baseurl}}/author/' class='article__author-name'>{{site.author.name}}</a> </div><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 %}</span> </div></div></div>",
"category" : "{{ post.category }}",
"tags" : "{{ post.tags | array_to_sentence_string }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date | date: '%b %-d, %Y' }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]