-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
taxonomy-term.md under /content/taxonomy-name/ instead of the documented /taxonomy-name/taxonomy-term/ _index.md #3772
Comments
A bug if it works, but I have a hard time wrap my head around it. |
@bep To clear things up Hugo thinks that the front matter from the content page under If you want to give me an email, I can provide you with a Hugo project as a ZIP to see this behavior with your own eyes. |
Hi @bep here's a repo that shows exactly what I did. https://github.com/guayom/hugo-taxonomies I don't know if this is a bug, I think that this is just the expected behavior for pages. In the readme I try to explain why. |
@bep, if I had to take a guess, maybe it's similar to the |
Just tested what @rdwatters said and I am able to render content on the home page with: And I can confirm that @guayom 's content organization doesn't break the |
And that is exactly why I'm labelling it as a bug here. I'm working on "page bundles" now, which is a very intricate balance and hard thing to do while still not breaking stuff, and having to also consider a set of accidental corner cases is not something I'm willing to take on. |
The most tanglible benefit of @guayom 's method is that the user can pass front matter to taxonomies without replicating the taxonomy URL as a folder path to insert the Creating a folder per taxonomy term is not ideal IMO. And I opened this issue because this method looked like something that could save people time while organizing their Hugo project. But you've already stated what you think @bep and you are the one who knows best. So if you want just close the issue. There's no point in having it open forever. |
@onedrawingperday @guayom My thoughts are as follows when it comes to discussions of content modeling and source organization with Hugo:
It's technically the exact same number of files created, so I take it your issue is with the number of directories? Maybe you're asking for a new kind of generator for taxonomies as a feature request then? (This is just me throwing out an idea; if you would want said feature, please open a new issue, of course 😄). |
I agree that the content file in directory per taxonomy is cumbersome, but then fix that. Having one file per taxonomy in one single directory makes it just slightly better. What about thinking up some optimal solution to the problem instead of looking for workarounds? There is another issue asking for "content from data files"... Mix that thought with ... |
Well it's not very practical making a bazillion folders and open and close them all the time. Is it? I have consciously avoided using taxonomies because of this. But this discussion is kind of pointless as it has been made explicitly clear by @bep that this method is something he is not willing to support. Also I will not open a new feature request and I am closing this issue as it has already been addressed by the lead maintainer and there is no point in discussing it further. |
@onedrawingperday this is an issue that needs a fix and will stay open. As to "willing to support": I have not looked into this issue, and as such cannot say anything qualified about it. The issue is here to remind me or others that we need to look into this. Hugo is an OSS project, driven by peoples' spare time, so expecting "within the hour" support is unreasonable. |
Not expecting support within the hour. Never had. Never will. |
Right. @bep I revisited this issue just now and it turns out that I never saw your comment #3772 (comment) as I was replying at the very same time. As to the "willing to support" quote I was replying to the following:
Apologies for closing the issue. It was a misunderstanding on my part. And I didn't want my mobile push notifications polluted by a discussion that appeared to be going nowhere. If you or anyone else does anything about this issue it is entirely up to you. I wasn't trying to be pushy or anything of the sort. And with that. Adios. I'm not really into Github or Forums anyway. |
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. |
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. |
Today it was reported by @guayom and reproduced by me, that one can pass custom parameters to a taxonomy list page simply by creating a
taxonomy-term.md
under/content/taxonomy-name/
instead of the documented/taxonomy-name/taxonomy-term/ _index.md
You can find the steps to reproduce this undocumented Hugo behavior at this post in the forum:
https://discourse.gohugo.io/t/solved-dynamically-filter-pages-by-taxonomy/7679/26?u=onedrawingperday
I took the rare step to open a Github Issue because I would like to know if we can safely use this way to pass front matter to taxonomy lists in our templates? Or do you consider it a bug?
In my humble opinion this makes it much easier to customise a taxonomy list page or even render a taxonomy terms menu.
This works in the latest Hugo with the default Pretty URLs setting.
This will not work with Ugly URLs enabled.
The text was updated successfully, but these errors were encountered: