fix: correct HTML rendering in entry body and feed excerpts
- entry.html.twig: add |raw to page.content (autoescape: true in system.yaml was escaping all HTML output including rendered markdown) - tracker.html.twig: use |striptags|slice(0,250) for clean plain-text excerpts instead of raw HTML summary - Both templates: fix location display whitespace (Tokyo , Japan → Tokyo, Japan) using parts array pattern with Twig whitespace control Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,10 +28,10 @@
|
||||
</time>
|
||||
{% if page.header.location_city or page.header.location_country %}
|
||||
<p class="entry-location">
|
||||
📍
|
||||
{% if page.header.location_city %}{{ page.header.location_city }}{% endif %}
|
||||
{% if page.header.location_city and page.header.location_country %}, {% endif %}
|
||||
{% if page.header.location_country %}{{ page.header.location_country }}{% endif %}
|
||||
{%- set _loc = [] -%}
|
||||
{%- if page.header.location_city -%}{%- set _loc = _loc|merge([page.header.location_city]) -%}{%- endif -%}
|
||||
{%- if page.header.location_country -%}{%- set _loc = _loc|merge([page.header.location_country]) -%}{%- endif -%}
|
||||
📍 {{ _loc|join(', ') }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if page.header.weather_desc or page.header.weather_temp_c %}
|
||||
@@ -51,7 +51,7 @@
|
||||
</header>
|
||||
|
||||
<div class="entry-body">
|
||||
{{ page.content }}
|
||||
{{ page.content|raw }}
|
||||
</div>
|
||||
|
||||
{% set images = page.media.images %}
|
||||
|
||||
Reference in New Issue
Block a user