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

Option to not generate aliases for first page of pagination pages #12572

Closed
razonyang opened this issue Jun 6, 2024 · 5 comments · Fixed by #12576
Closed

Option to not generate aliases for first page of pagination pages #12572

razonyang opened this issue Jun 6, 2024 · 5 comments · Fixed by #12576
Assignees
Milestone

Comments

@razonyang
Copy link
Contributor

https://discourse.gohugo.io/t/pagination-seems-to-create-aliases/22422/6?u=razon

@bep
Copy link
Member

bep commented Jun 6, 2024

We currently have a paginate option (meaning: default pagination page size), so we need to consolidate a little. I suggest:

// Loaded from the 'pagination' key in hugo.toml.
type struct PaginationConfig {
  DefaultPageSize int // old paginate
  DisableAliases bool
  Path string // old paginatePath
}

And make sure that the old config setup also works.

@jmooring
Copy link
Member

jmooring commented Jun 6, 2024

We also have paginatePath.

@jmooring
Copy link
Member

jmooring commented Jun 7, 2024

I just saw something like this in a site config:

[languages.en]
weight = 1
paginatePath = "page-en"

[languages.de]
weight = 2
paginatePath = "page-de"

The pagination path is different for each language. Not sure how that's going to work if we include it in the struct above.

@bep
Copy link
Member

bep commented Jun 7, 2024

The pagination path is different for each language. Not sure how that's going to work if we include it in the struct above.

I don't see how that will be a problem, the above will still work. We will want to eventually deprecate paginatePath etc., but then the above would look like:

[languages.de]
weight = 2
[languages.de.pagination]
path = "page-de"

@bep bep self-assigned this Jun 7, 2024
bep added a commit to bep/hugo that referenced this issue Jun 7, 2024
Also consolidate the pagination configuration into a struct.

Closes gohugoio#12572
bep added a commit to bep/hugo that referenced this issue Jun 7, 2024
Also consolidate the pagination configuration into a struct.

Closes gohugoio#12572
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
bep added a commit that referenced this issue Jun 8, 2024
Also consolidate the pagination configuration into a struct.

Closes #12572
@bep bep closed this as completed in #12576 Jun 8, 2024
bep added a commit to bep/hugo that referenced this issue Jun 9, 2024
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants