Fixed search for multiline news

This commit is contained in:
George 2024-07-11 11:09:46 -03:00 committed by GitHub
parent 607ff6af44
commit d904c52149
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -79,7 +79,6 @@
{% if post.redirect == blank %}
title: "{{ title | truncatewords: 13 }}",
{% 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>',
{% else %}
title: "{{ title | truncatewords: 13 }}",
@ -102,9 +101,9 @@
{%- for item in collection.docs -%}
{
{%- 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 -%}
{%- 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 -%}
id: "{{ collection.label }}-{{ title | slugify }}",
title: '{{ title | emojify | truncatewords: 13 }}',