add chapter name display on pages

This commit is contained in:
Yan Lin 2026-02-04 16:54:02 +01:00
parent 0fecc2303f
commit b554d06a04
2 changed files with 2 additions and 4 deletions

View file

@ -123,7 +123,7 @@ ul, ol {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
time { time, .chapter {
color: var(--muted); color: var(--muted);
font-size: 0.9rem; font-size: 0.9rem;
} }

View file

@ -8,9 +8,7 @@
<article> <article>
<header class="post-header"> <header class="post-header">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
{% if page.date %} {% if page.extra.chapter %}<span class="chapter">{{ page.extra.chapter }} | </span>{% endif %}{% if page.date %}<time datetime="{{ page.date }}">{{ page.date | date(format="%B %d, %Y") }}</time>{% endif %}
<time datetime="{{ page.date }}">{{ page.date | date(format="%B %d, %Y") }}</time>
{% endif %}
</header> </header>
<div class="content"> <div class="content">
{% if page.content is containing("<!--TOC_PLACEHOLDER-->") %} {% if page.content is containing("<!--TOC_PLACEHOLDER-->") %}