feat: parse markdown in post summary & description

This commit is contained in:
2025-04-28 16:03:17 +07:00
parent 1b1ea501a8
commit cbb52d74a4
3 changed files with 8 additions and 9 deletions

View File

@@ -98,11 +98,10 @@ header {
.tag {
margin-inline-end: 0;
}
.separator {
}
.separator {
margin-inline-end: 0.2rem;
user-select: none;
}
}
.language-switcher {

View File

@@ -126,7 +126,7 @@ $padding: 2.5rem;
@media only screen and (max-width: 1100px) {
.bloglist-container {
grid-template-columns: 1fr;
display: block;
}
.pinned-label svg {

View File

@@ -83,7 +83,7 @@
<li class="date">{{- macros_format_date::format_date(date=post.date, short=false, language_strings=language_strings) -}}</li>
{%- endif -%}
{%- if show_date and show_updated -%}
<li class="mobile-only">{{- separator -}}</li>
<li class="mobile-only separator">{{- separator -}}</li>
{%- endif -%}
{%- if show_updated -%}
{%- set last_updated_str = macros_translate::translate(key="last_updated_on", default="Updated on $DATE", language_strings=language_strings) -%}
@@ -142,9 +142,9 @@
<div class="description">
{% if post.description %}
<p>{{ post.description }}</p>
<p>{{ post.description | markdown(inline=true) | safe }}</p>
{% elif post.summary %}
<p>{{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…</p>
<p>{{ post.summary | markdown(inline=true) | trim_end_matches(pat=".") | safe }}…</p>
{% endif %}
</div>
<a class="readmore" href="{{ post.permalink }}">{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }}&nbsp;<span class="arrow"></span></a>