Fixed news titles in search (#2450)
Signed-off-by: George Araujo <george.gcac@gmail.com>
This commit is contained in:
parent
da4486507a
commit
c0763fff61
|
|
@ -84,20 +84,26 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% for collection in site.collections %}
|
{%- for collection in site.collections -%}
|
||||||
{%- for item in collection.docs -%}
|
{%- for item in collection.docs -%}
|
||||||
{
|
{
|
||||||
|
{%- if item.inline -%}
|
||||||
|
{%- assign title = item.content | remove: '<p>' | remove: '</p>' | escape | strip -%}
|
||||||
|
{%- else -%}
|
||||||
{%- assign title = item.title | escape -%}
|
{%- assign title = item.title | escape -%}
|
||||||
|
{%- endif -%}
|
||||||
id: "{{ collection.label }}-{{ title | slugify }}",
|
id: "{{ collection.label }}-{{ title | slugify }}",
|
||||||
title: "{{ title }}",
|
title: '{{ title | emojify }}',
|
||||||
description: "{{ item.description | strip_html | strip_newlines | escape }}",
|
description: "{{ item.description | strip_html | strip_newlines | escape }}",
|
||||||
section: "{{ collection.label | capitalize }}",
|
section: "{{ collection.label | capitalize }}",
|
||||||
|
{%- unless item.inline -%}
|
||||||
handler: () => {
|
handler: () => {
|
||||||
window.location.href = "{{ item.url | relative_url }}";
|
window.location.href = "{{ item.url | relative_url }}";
|
||||||
},
|
},
|
||||||
|
{%- endunless -%}
|
||||||
},
|
},
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{%- if site.socials_in_search -%}
|
{%- if site.socials_in_search -%}
|
||||||
{%- if site.email -%}
|
{%- if site.email -%}
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue