Reduce white-space to trim down filesize
This commit is contained in:
parent
1c0f31d563
commit
267d2c96a0
1 changed files with 20 additions and 20 deletions
|
@ -3,34 +3,34 @@ layout: null
|
||||||
---
|
---
|
||||||
|
|
||||||
var store = [
|
var store = [
|
||||||
{% for c in site.collections %}
|
{%- for c in site.collections -%}
|
||||||
{% if forloop.last %}
|
{%- if forloop.last -%}
|
||||||
{% assign l = true %}
|
{%- assign l = true -%}
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{% assign docs = c.docs | where_exp:'doc','doc.search != false' %}
|
{%- assign docs = c.docs | where_exp:'doc','doc.search != false' -%}
|
||||||
{% for doc in docs %}
|
{%- for doc in docs -%}
|
||||||
{% if doc.header.teaser %}
|
{%- if doc.header.teaser -%}
|
||||||
{% capture teaser %}{{ doc.header.teaser }}{% endcapture %}
|
{%- capture teaser -%}{{ doc.header.teaser }}{%- endcapture -%}
|
||||||
{% else %}
|
{%- else -%}
|
||||||
{% assign teaser = site.teaser %}
|
{%- assign teaser = site.teaser -%}
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{
|
{
|
||||||
"title": {{ doc.title | jsonify }},
|
"title": {{ doc.title | jsonify }},
|
||||||
"excerpt":
|
"excerpt":
|
||||||
{% if site.search_full_content == true %}
|
{%- if site.search_full_content == true -%}
|
||||||
{{ doc.content | strip_html | strip_newlines | jsonify }},
|
{{ doc.content | strip_html | strip_newlines | jsonify }},
|
||||||
{% else %}
|
{%- else -%}
|
||||||
{{ doc.content | strip_html | strip_newlines | truncatewords: 50 | jsonify }},
|
{{ doc.content | strip_html | strip_newlines | truncatewords: 50 | jsonify }},
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
"categories": {{ doc.categories | jsonify }},
|
"categories": {{ doc.categories | jsonify }},
|
||||||
"tags": {{ doc.tags | jsonify }},
|
"tags": {{ doc.tags | jsonify }},
|
||||||
"url": {{ doc.url | absolute_url | jsonify }},
|
"url": {{ doc.url | absolute_url | jsonify }},
|
||||||
"teaser":
|
"teaser":
|
||||||
{% if teaser contains "://" %}
|
{%- if teaser contains "://" -%}
|
||||||
{{ teaser | jsonify }}
|
{{ teaser | jsonify }}
|
||||||
{% else %}
|
{%- else -%}
|
||||||
{{ teaser | absolute_url | jsonify }}
|
{{ teaser | absolute_url | jsonify }}
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
}{% unless forloop.last and l %},{% endunless %}
|
}{%- unless forloop.last and l -%},{%- endunless -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endfor %}]
|
{%- endfor -%}]
|
||||||
|
|
Loading…
Reference in a new issue