Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make home.Pages work like the other sections #6153

Closed
bep opened this issue Aug 1, 2019 · 0 comments · Fixed by #6181

Comments

@bep
Copy link
Member

commented Aug 1, 2019

This is certainly a breaking change, but with easy workaround. I have been wanting to do this before, and when working on this front matter cascade thing, I think it's time ...

The problem with the current situation is that home.Pages is the same as site.RegularPages, which makes it very hard to create functions (or partials) that takes a section/home and creates a tree starting from that node. You end up with very ugly logic.

/cc @regisphilibert and gang.

@bep bep added the Enhancement label Aug 1, 2019
@bep bep self-assigned this Aug 1, 2019
@bep bep added this to the v0.57 milestone Aug 1, 2019
bep added a commit to bep/hugo that referenced this issue Aug 1, 2019
bep added a commit to bep/hugo that referenced this issue Aug 2, 2019
bep added a commit to bep/hugo that referenced this issue Aug 2, 2019
bep added a commit to bep/hugo that referenced this issue Aug 2, 2019
bep added a commit to bep/hugo that referenced this issue Aug 2, 2019
bep added a commit to bep/hugo that referenced this issue Aug 6, 2019
This is preparation for gohugoio#6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

Fixes gohugoio#6154
Fixes gohugoio#6153
Fixes gohugoio#6152
bep added a commit to bep/hugo that referenced this issue Aug 8, 2019
This is preparation for gohugoio#6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

Fixes gohugoio#6154
Fixes gohugoio#6153
Fixes gohugoio#6152
bep added a commit to bep/hugo that referenced this issue Aug 8, 2019
This is preparation for gohugoio#6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

Fixes gohugoio#6154
Fixes gohugoio#6153
Fixes gohugoio#6152
bep added a commit to bep/hugo that referenced this issue Aug 8, 2019
This is preparation for gohugoio#6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

Fixes gohugoio#6154
Fixes gohugoio#6153
Fixes gohugoio#6152
bep added a commit to bep/hugo that referenced this issue Aug 8, 2019
This is preparation for gohugoio#6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix.

Fixes gohugoio#6154
Fixes gohugoio#6153
Fixes gohugoio#6152
bep added a commit to bep/hugo that referenced this issue Aug 8, 2019
This is preparation for gohugoio#6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix.

Fixes gohugoio#6154
Fixes gohugoio#6153
Fixes gohugoio#6152
@bep bep closed this in #6181 Aug 8, 2019
bep added a commit that referenced this issue Aug 8, 2019
This is preparation for #6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix.

Fixes #6154
Fixes #6153
Fixes #6152
cflee added a commit to cflee/cfleecom that referenced this issue Aug 16, 2019
There is a breaking change in Hugo 0.57: "home.Pages" now only returns page in the top level section (i.e. Posts) instead of all regular pages in the site. Switch to using ".Site.RegularPages" instead. See gohugoio/hugo#6153 for actual change and the theme aftermath in gohugoio/hugoThemes#682
cflee added a commit to cflee/cfleecom that referenced this issue Aug 16, 2019
* Update and de-submodule hyde-hyde theme

* Patch theme for Hugo 0.57

There is a breaking change in Hugo 0.57: "home.Pages" now only returns page in the top level section (i.e. Posts) instead of all regular pages in the site. Switch to using ".Site.RegularPages" instead. See gohugoio/hugo#6153 for actual change and the theme aftermath in gohugoio/hugoThemes#682

* Add post about StashAway reoptimisation

* Bump netlify hugo version

* Bump the version properly to handle new versioning

Since v0.54, the initial version is released as v0.54.0 instead of v0.54.
Vimux added a commit to Vimux/Binario that referenced this issue Aug 17, 2019
Hugo 0.57 breaks mainSections logic and how the home section works.
Switch to .Site.RegularPages for the home page paginator to restore old
behavior.

Fix #13

See gohugoio/hugoThemes#682,
gohugoio/hugoThemes#678,
gohugoio/hugo#6153
Vimux added a commit to Vimux/Binario that referenced this issue Aug 17, 2019
Hugo 0.57 breaks mainSections logic and how the home section works.
Switch to .Site.RegularPages for the home page paginator to restore old
behavior.

Fix #13

See gohugoio/hugoThemes#682,
gohugoio/hugoThemes#678,
gohugoio/hugo#6153
htr3n added a commit to htr3n/htr3n-blog that referenced this issue Aug 19, 2019
zoncoen added a commit to zoncoen/hugo_theme_pickles that referenced this issue Sep 18, 2019
Hugo has breaking changes in v0.57.0.
ref. gohugoio/hugo#6153
Roboe added a commit to Roboe/blog that referenced this issue Sep 28, 2019
Changelog for v0.57.0: https://github.com/gohugoio/hugo/releases/tag/v0.57.0

> `home.Pages` now only returns pages in the top level section. Before this release, it included _all regular pages in the site_. This made it easy to list all the pages on home page, but it also meant that you needed to take special care if you wanted to navigate the page tree from top to bottom. If you need _all regular pages_, use `.Site.RegularPages`. Also see gohugoio/hugo#6153.
> `.Pages` now include sections. We have added `.RegularPages` as a convenience method if you want the old behaviour. See gohugoio/hugo#6171 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.