Request to add a
shortcodeDir config variable so that the shortcodes could be placed in any directory (not necessarily a subdirectory of layouts). Still would want Hugo to look in all the normal places just add this to this list of places to search, much like the layoutDir works. Further it should be the last place to look so one could “override” same named shortcodes in the theme (does Hugo do this overriding already??)
For end users I want to be able to have a “plugins” directory in the root of the repo. “plugins” is a little more known and understood than shortcodes. In this way end users could add custom plugins i.e shortcodes to their “toolbox” without having to have a layouts directory (unlikely they would be writing partials as I would be doing that and adding them to the theme).
If I understand you correctly, we do the opposite: The layouts, including shortcodes, in the project always wins. Anything else would not make sense.
As to your original question, I believe this fits nicely into a larger debate somewhere else.
what you said is what i meant. The project’s layouts win (override any in theme).
Where would that debate be? Thought “feature” would be a good place. Should this post be moved?
It is a minor thing really, not needed only “nice to have”. For now I just made layoutsDir set to “plugins” and there will be a redundant subdirectory “shortcodes” within that directory “plugins”
There is a “widgets discussion” somewhere – where I stated that we should solve the “external resources” problem first (i.e. references to themes, shortcode “packages” etc.). And a “shortcodeDir” setting just adds work with little towards solving the real problem.