-
Notifications
You must be signed in to change notification settings - Fork 4
/
search.json
executable file
·15 lines (15 loc) · 1.4 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'> <div class='article__inner'> {% if post.image %} <div class='image-wrap'> <a class='article__image' href='{{post.url | prepend: site.baseurl}}'> <img src='{{site.baseurl}}{{post.image}}' alt='{{post.title}}'> </a> </div> {% endif %} <div class='article__content'> <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: 125 }}{% endif %} </p> <div class='article__meta'> <a href='{{site.baseurl}}/about/' class='article__author-link'>{{site.author.name}}</a> <span class='article__date'><time datetime='{{ post.date | date_to_xmlschema }}'>{{ post.date | date_to_string }}</time></span> {% 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> {% endif %} </div> </div> </div> </div>",
"category" : "{{ post.category }}",
"tags" : "{{ post.tags | array_to_sentence_string }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]