Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ relative_links:
enabled: true
collections: true

# Keep article titles stable: use explicit front matter titles when present,
# otherwise let the layouts fall back to the Markdown filename.
titles_from_headings:
enabled: false

defaults:
- scope:
path: "AI"
Expand Down
10 changes: 0 additions & 10 deletions _layouts/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
{% assign dated_articles = site.pages | where_exp: 'item', 'item.date != nil' %}
{% assign articles = dated_articles | where_exp: 'item', 'item.path contains page.category_path' | sort: 'date' | reverse %}
<main class="listing-page">
<header class="listing-hero">
<a class="back-link" href="{{ '/' | relative_url }}">← 返回首页</a>
<p class="section-kicker">{{ page.kicker }}</p>
<div class="listing-title-row">
<h1>{{ page.title }}</h1>
<span>{{ articles.size }}</span>
</div>
<p>{{ page.description }}</p>
</header>

<section class="listing-content" aria-label="{{ page.title }}文章列表">
<div class="filter-row">
<label class="inline-filter">
Expand Down
12 changes: 1 addition & 11 deletions archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@
---
{% assign articles = site.pages | where_exp: 'item', 'item.date != nil' | sort: 'date' | reverse %}
<main class="listing-page archive-page">
<header class="listing-hero">
<a class="back-link" href="{{ '/' | relative_url }}">← 返回首页</a>
<p class="section-kicker">THE COMPLETE ARCHIVE</p>
<div class="listing-title-row">
<h1>文章归档</h1>
<span>{{ articles.size }}</span>
</div>
<p>从最近写下的内容开始,沿着时间回看这份持续生长的知识档案。</p>
</header>

<section class="archive-content">
<section class="archive-content" aria-label="文章归档">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore a visible top-level heading

After removing the hero, /archive/ and all pages using the category layout no longer render an <h1>; the archive outline starts at its year <h2> elements and category pages start at article <h2> elements. This removes the visible page identity and the top-level landmark used by heading navigation, especially for users opening a listing directly, so retain a compact page heading when simplifying the decorative hero.

Useful? React with 👍 / 👎.

<div class="filter-row">
<label class="inline-filter">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="6.75"></circle><path d="m16 16 4.25 4.25"></path></svg>
Expand Down
Loading