gohugoio / hugo

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

Permalink for taxonomy list page cannot be singular #7274

Closed gcushen closed 4 years ago

gcushen commented 4 years ago

Hugo users have requested to change the permalink for taxonomy list pages, such as to make it singular, however it appears that Hugo does not currently allow for this.

Issue: The following config.toml snippet correctly changes the URL of taxonomy term pages, but the taxonomy list page still remains at the old URL of example.com/tags/ rather than example.com/tag/.

[permalinks]
    tags = "/tag/:slug/"

As requested by Hugo users at

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

Hugo Static Site Generator v0.70.0/extended darwin/amd64 BuildDate: unknown

Does this issue reproduce with the latest release?

Yes

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

mitchellolsthoorn commented 3 years ago

This is possible by using the url option. In the example below:

config/_default/config.yaml:

permalinks:
  tags: "tag/:slug/"
  ... <existing permalinks>

content/tags/_index.md:

---
url: tag
---

both the archive page and the individual tag pages are singular.

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.