Fixed search for multiline news
This commit is contained in:
parent
607ff6af44
commit
d904c52149
|
|
@ -79,7 +79,6 @@
|
||||||
{% if post.redirect == blank %}
|
{% if post.redirect == blank %}
|
||||||
title: "{{ title | truncatewords: 13 }}",
|
title: "{{ title | truncatewords: 13 }}",
|
||||||
{% elsif post.redirect contains '://' %}
|
{% elsif post.redirect contains '://' %}
|
||||||
// TODO: fix the svg icon position for external posts
|
|
||||||
title: '{{ title | truncatewords: 13 }} <svg width="1.2rem" height="1.2rem" top=".5rem" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9" class="icon_svg-stroke" stroke="#999" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg>',
|
title: '{{ title | truncatewords: 13 }} <svg width="1.2rem" height="1.2rem" top=".5rem" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9" class="icon_svg-stroke" stroke="#999" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg>',
|
||||||
{% else %}
|
{% else %}
|
||||||
title: "{{ title | truncatewords: 13 }}",
|
title: "{{ title | truncatewords: 13 }}",
|
||||||
|
|
@ -102,9 +101,9 @@
|
||||||
{%- for item in collection.docs -%}
|
{%- for item in collection.docs -%}
|
||||||
{
|
{
|
||||||
{%- if item.inline -%}
|
{%- if item.inline -%}
|
||||||
{%- assign title = item.content | strip_html | strip_newlines | escape | strip -%}
|
{%- assign title = item.content | newline_to_br | replace: "<br />", " " | replace: "<br/>", " " | strip_html | strip_newlines | escape | strip -%}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{%- assign title = item.title | strip_html | strip_newlines | escape | strip -%}
|
{%- assign title = item.title | newline_to_br | replace: "<br />", " " | replace: "<br/>", " " | strip_html | strip_newlines | escape | strip -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
id: "{{ collection.label }}-{{ title | slugify }}",
|
id: "{{ collection.label }}-{{ title | slugify }}",
|
||||||
title: '{{ title | emojify | truncatewords: 13 }}',
|
title: '{{ title | emojify | truncatewords: 13 }}',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue