-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Use alternative tree root instead of index.md (such as README.md) #4691
Comments
I see your point, but it looks like an expensive feature. If we look beyond the hardcodings, I don't see a way to do this without either 1) add some kind of config option or 2) break stuff. 1) is doable, of course, but that would kind if limit the "content portability" that the issue is trying to improve in the first place. Once people get used to these "index.md" files etc., having people share articles (as bundles possibly) in zip files and just add it to the content and it just works ... As a contributor to some magazine I would love to not have to do: "Hey, editor, here is my article. Oh, I have used a non-standard naming scheme, so you must toggle some setting and have Hugo version at least ..." |
I see your point, and 1) is the route I would suggest. Also with regards to it not being a standard for Hugo, it is a "sort of standard" for many source control sites, which is why it would be great to be able to take advantage of that. |
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. |
Hey, this is of interest to me, and looks like it may be less of a challenge than it was in 2018 (at least based on a fairly quick glance through the code for Is this still of interest/would a PR be accepted? |
Looking at this further, it looks like a matter of plumbing the configuration into https://github.com/gohugoio/hugo/blob/master/hugofs/files/classifier.go#L84 and a few other places. My initial thought was to make this a build option, but that means that we may need to open bundle files during the filesystem traversal to read front matter. @bep , do you have a preference on implementation here (global option, or build option)? |
So, my recent work in this area has been slowly making this more friendly for "non file pages" (aka pages from data). I would love to add this if it didn't in some way make that thing harder. The grand idea now is that if you leave out taxonomies there are
I'm not sure how I will handle WordPress etc. yet, but if we for the sake of this discussion say that:
I would think that the only sane way to implement this would be at the file system level. I admit that part of that code is a little hard to understand (the decorators, especially), but I think the gist of it is:
|
That's roughly what I've got in progress; there are a few ugly bits because I got started on the build option choice, so each directory in the "fs" would have a list of file prefixes (e.g. |
Sorry for the delay, I have created this proposal that should handle this case: #10129 |
It'd be great to be able to configure the root file that hugo assumes when building its front matter, when creating documentation sites, for the following reasons:
This seems to me to be extremely well aligned with Hugo's tree structure for organisation, other than the hardcoded index filename requirement.
I think this is useful because it helps developers consume documentation in this manner how ever they'd like; either reading directly from github, or in a more professional generated output from Hugo.
The text was updated successfully, but these errors were encountered: