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

Velimir Đurković
18 hours ago 55120c7e8981919aa51d57a8e0abe1b1f50d6c66
refs
author Velimir Đurković <velimir.djurkovic@gmail.com>
Wednesday, August 5, 2026 23:40 +0200
committer GitHub <noreply@github.com>
Wednesday, August 5, 2026 23:40 +0200
commit55120c7e8981919aa51d57a8e0abe1b1f50d6c66
tree 860000df5b11e7fba6b808490b5b5cac83191efe tree | zip | gz
parent 9e1d7b96a2998887d174adf592b7f98adc4af14b 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