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

Permalink configuration allowing directory structure #9327

Open
jhvanderschee opened this issue Dec 27, 2021 · 5 comments
Open

Permalink configuration allowing directory structure #9327

jhvanderschee opened this issue Dec 27, 2021 · 5 comments
Labels
Milestone

Comments

@jhvanderschee
Copy link

jhvanderschee commented Dec 27, 2021

There seems to be no way to reflect the directory structure in a section when setting the permalink in the config (and mimic the default behaviour). Adding a variable like ‘:dir’ or ‘:filepath’ would allow using config permalinks in combination with directory structures (without creating subsections).

Default behaviour for section 'cars' (without _index.md files and thus without subsections):

filepath: /content/cars/mercedes/suv/s560.md
URL: /cars/mercedes/suv/s560/

You cannot get this result when setting the permalink in the config. The closest you can get is by using ':sections', but that requires you to use _index.md files (thus subsections).

More info:
https://discourse.gohugo.io/t/permalink-with-directory-structure/36203/10

@bep
Copy link
Member

bep commented Dec 27, 2021

Something like that would be reasonable yes, but we need to wait a little before doing it ... I'm close to wrap up a spring cleaning PR that, among other things, gets a better defined definition for what a content path is in Hugo (which is not trivial when you think beyond the simple case; consider file mounts, languages, content sources that is not a file, content bundles ...).

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Dec 28, 2022
@jmooring
Copy link
Member

jmooring commented Dec 28, 2022

Duplicate of #8523

@jmooring jmooring marked this as a duplicate of #8523 Dec 28, 2022
@github-actions
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 Jan 19, 2023
@jmooring
Copy link
Member

jmooring commented Feb 9, 2023

I erroneously closed this as a duplicate. Reopening...

@jmooring jmooring reopened this Feb 9, 2023
@bep bep added this to the v0.131.0 milestone Jul 22, 2024
@bep bep modified the milestones: v0.131.0, v0.133.0 Aug 9, 2024
@bep bep modified the milestones: v0.133.0, Unscheduled Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants