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

Patrick Kollitsch
09.52.2025 40fea59c8b5474ccc60750bed159032b2a55ca28
refs
author Patrick Kollitsch <patrick@davids-neighbour.com>
Sunday, February 9, 2025 10:52 +0100
committer Patrick Kollitsch <patrick@davids-neighbour.com>
Sunday, February 9, 2025 10:52 +0100
commit40fea59c8b5474ccc60750bed159032b2a55ca28
tree c77cadcacede48764a276007863aa72f4c8e8217 tree | zip | gz
parent 3fc0dba4012108749f433da017d9e02cf64b6503 view | diff
theme(fix): rework of the way the main sections for index.html are calculated

the following is a draft for the release page that should explain most of it:

* Index page: the way main sections were evaluated was unclear and probably changed much from the original design in GoHugo. This has been fixed and the main sections are now evaluated in a more consistent way. This might affect what is shown on your website, so open a discussion if you see something wrong and try to explain exactly what you expected to see in sense of included posts and order of those posts.

The old way did this: check all configured main sections (or post, if nothing is set) > range through the section and display the first n+m posts (n = number of full previews, m = number of title previews only).

The new way does this: load all posts in the main sections > range through the collection and display the first n+m posts (n = number of full previews, m = number of title previews only).

Basically, the old way took every single section you configured and displayed them separate, the new way takes all posts from all sections and displays them in one list. This is more consistent and should be more predictable for you as a user. It's also the way it was intended to work from the beginning according to the documentation.

closes #686

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2 files modified
69 ■■■■■ changed files
exampleSite/config.toml 2 ●●●●● diff | view | raw | blame | history
layouts/index.html 67 ●●●●● diff | view | raw | blame | history