gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.73k stars 7.45k forks source link

Page is no longer the descendant of top-level section in v0.69.0 #7178

Closed reuixiy closed 4 years ago

reuixiy commented 4 years ago

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.69.0/extended linux/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Yes.


2020-04-16-15-51-39

{{ $sectionPage := .CurrentSection }}
{{ $.Scratch.Delete "pages" }}

{{ range $.Site.RegularPages }}
    {{ if (.IsDescendant $sectionPage) }}
        {{ $.Scratch.Add "pages" (slice .) }}
    {{ end }}
{{ end }}

{{ $pages := $.Scratch.Get "pages" }}
{{ $pages }}

I think this may be related to #7096.

Downstream issue https://github.com/reuixiy/hugo-theme-meme/issues/116#issuecomment-614369427 (Non-English).

Related code:

  1. tree-sections.html
  2. list.html
reuixiy commented 4 years ago

Seems fixed in v0.69.2.

Thanks!

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.