-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Default path resolution for partials when a directory is passed #11117
Comments
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. |
Hugo's partial resolution does not currently support directories as paths. Having them would be convenient as they would allow more modular and self contained Hugo modules. For example, I'm currently developing something like this:
To use this module, I have to explicitly state that I want to include the main partial:
However, it makes more sense to call
{{ partial "identicon" }}
and have it resolve toidenticon/main.html
oridenticon/index.html
by default.To attain this behaviour with the current release, I have to create another file
partials/identicon.html
which simply callspartials/identicon/main
.This leads to an extra file in the partial tree, which is unpreferable in terms of organization:
I propose a path resolving mechanism be implemented in Hugo which resolves directory includes either
main.html
orindex.html
. It would make the file structure more organized and self contained.The text was updated successfully, but these errors were encountered: