]> danix's work - danix2-hugo-theme.git/commit
fix: use excerpts instead of full content in article cards
authorDanilo M. <redacted>
Sun, 5 Apr 2026 08:32:37 +0000 (10:32 +0200)
committerDanilo M. <redacted>
Sun, 5 Apr 2026 08:32:37 +0000 (10:32 +0200)
commit36fffd8e8dfab639b835e5794b18267c146d231c
tree55191a62e2c11ab2b6981e31e91cb1410edc9b1b
parente686b06ea46ae25dba0a40a259f2937b3abf7a7c
fix: use excerpts instead of full content in article cards

Updated both home.html and section.html to:
1. Check for 'excerpt' field in front matter first
2. If excerpt exists, use it
3. If not, generate from content: get first paragraph, convert to plain text, truncate to 150 characters

This prevents full article content from showing in feeds while respecting custom excerpts when provided.

Applies to both homepage feed and articles section list view.

Co-Authored-By: Claude Haiku 4.5 <redacted>
layouts/home.html
layouts/section.html