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

Inherited index templates #36

Open
mntn-xyz opened this issue Sep 22, 2021 · 2 comments
Open

Inherited index templates #36

mntn-xyz opened this issue Sep 22, 2021 · 2 comments
Labels
gmnhg Issue related to cmd/gmnhg question Further information is requested

Comments

@mntn-xyz
Copy link
Contributor

With the metadata now being the same across all indices, I was wondering if it would make sense to have subdirectories inherit their template from parent directories by default. This would let users make a template that would be inherited across a subdirectory tree. With a little bit of work, it would also allow the default template to generate indices across the entire site.

The main argument against this is that some people may not want an index for certain directories, or they may want to use the default directory index generated by their server. I think we could get around this by either treating an empty template file as a "do not render" instruction, or by looking for a specific file (directoryname.norender?) that turns off index generation for a specific tree.

@tdemin
Copy link
Owner

tdemin commented Sep 22, 2021

I'm interested in how Hugo does that, because the docs on lookup order are nowhere near as specific on inheritance. Provided the tool is a Hugo companion, it might be best to mimic it?

On skipping index generation: doesn't headless = true already do that?

@tdemin tdemin added gmnhg Issue related to cmd/gmnhg question Further information is requested labels Sep 22, 2021
@mntn-xyz
Copy link
Contributor Author

Good point, I'll investigate it more when I can. I've started noticing that the Hugo documentation is sparse and/or confusing in some areas, especially in these less visited areas. For example, it isn't clear from the docs that headless = true only affects leaf nodes, but I found that on a blog after some searching and confirmed it on my own as well. It's just a way to make a leaf "invisible" by excluding it from the branch index. Apparently it's intended for use in image galleries and such, somehow... it's a little confusing to me how it would be used, to be honest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gmnhg Issue related to cmd/gmnhg question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants