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

Velimir Đurković
05.40.2026 0eb90b32e2b1d995478365b95e7b4b2456215f81
refs
author Velimir Đurković <velimir.djurkovic@gmail.com>
Wednesday, August 5, 2026 23:40 +0200
committer Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Sunday, September 27, 2026 00:46 +0200
commit0eb90b32e2b1d995478365b95e7b4b2456215f81
tree 593b6946414cf93f8d7f08100a7d9224035237c0 tree | zip | gz
parent c31ff8582907a3d06dcd524980895c7860befb99 view | diff
fix: use site regular pages for related content lookup (#1073)

Closes #1072

This PR fixes an issue where related content is not displayed in the
Ananke theme unless `toc` is enabled.

The current template uses:

```go-html-template
{{- $related_content := .RegularPages.Related . -}}
```

This causes the related content lookup to fail in some page contexts,
resulting in no related pages being rendered even when related content
exists.

This PR changes the lookup to:

```go-html-template
{{- $related_content := .Site.RegularPages.Related . -}}
```

Using `.Site.RegularPages` ensures that related content is searched
across all regular pages in the site, restoring the expected related
content behavior.

The change is limited to the template lookup scope and does not
introduce any new functionality.
1 files modified
2 ■■■■■ changed files
layouts/single.html 2 ●●●●● diff | view | raw | blame | history