datat.fi/assets/javascripts/search-data.json

28 lines
839 B
JSON

---
layout: null
sitemap: false
---
var store = [
{%- for c in site.collections -%}
{%- if forloop.last -%}
{%- assign l = true -%}
{%- endif -%}
{%- assign docs = c.docs | where_exp: 'doc', 'doc.search != false' -%}
{%- for doc in docs -%}
{
"title": {{ doc.title | jsonify }},
"excerpt":
{%- if site.search_full_content == true -%}
{{ doc.content | strip_html | strip_newlines | jsonify }},
{%- else -%}
{{ doc.content | strip_html | strip_newlines | truncatewords: 50 | jsonify }},
{%- endif -%}
"categories": {{ doc.categories | jsonify }},
"tags": {{ doc.tags | jsonify }},
"url": {{ doc.url | absolute_url | jsonify }}
} {%- unless forloop.last and l -%}, {%- endunless -%}
{%- endfor -%}
{%- endfor -%}
]