mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
13 hours ago f6db2ffa757d50f3167846bef57a9b9afd796fd1
refs
author Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Saturday, November 21, 2026 09:13 +0100
committer Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Saturday, November 21, 2026 09:13 +0100
commitf6db2ffa757d50f3167846bef57a9b9afd796fd1
tree 38af26a29da28c4906dcf96f14a849b72e270ceb tree | zip | gz
parent 3a7d82e938f1c0929a623e0a343afac8da64b360 view | diff
fix(layouts): skip the home introduction when it has no content

An empty home page rendered an empty, padded article above the recent
posts. Render the article only when the home page has content, and add
fixture tests for both cases.

Closes #663

Signed-off-by: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
1 files modified
7 files added
59 ■■■■■ changed files
layouts/home.html 10 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/empty/content/_index.md 4 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/empty/content/post/first.md 5 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/empty/hugo.toml 2 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/filled/content/_index.md 5 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/filled/content/post/first.md 5 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/filled/hugo.toml 2 ●●●●● diff | view | raw | blame | history
tests/fixtures/home-content/home-content.test.mjs 26 ●●●●● diff | view | raw | blame | history