Answers for "strip newlines in jekyll"

0

strip newlines in jekyll

{% assign description = page.excerpt | newline_to_br | strip_newlines | replace: '<br />', ' ' | strip_html | strip |  truncatewords: 30 %}

<meta name="description" content="{{ description }}">
Replace newlines with br tag, then strip newlines, and then replace <br /> with space. Strip html and truncate for usage in meta description.
Posted by: Guest on May-06-2021

Browse Popular Code Answers by Language