feat: parse markdown in post summary & description (#517)

Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
rktjump 2025-04-26 10:53:19 -07:00 committed by GitHub
parent f47cefd42b
commit 93af295d78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View file

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

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>