Closed mdehollander closed 1 year ago
Add the static dir to the module.toml
makes that the content of the static folder is included in the build.
[[mounts]]
source = "static"
target = "static"
Thanks, I see what you mean. I'll have to take a closer look at it. Not quite sure what my rationale was.
For now, I think we should have a default (on gethyas or @hyas/core level) and an override possibility (on @hyas/seo level and/or on theme level: @hyas/themes-starter-bootstrap and @hyas/themes-doks).
Get back to you!
Can't reproduce (anymore), but will check again when updating this repo.
Tested with the new create-hyas (v1.0.3): bootstrap-starter-rec
, replaced favicons, no module mount for static, seems to be working/looks OK to me:
Files in static/
work for me, too (with latest create-hyas). Thus I think this can be closed.
Will close this issue for now then. Mattias, feel free to reopen if you think that's needed.
From relevant doc:
When you add a mount, the default mount for the concerned target root is ignored: be sure to explicitly add it.
Since none of Doks current mounts target static
, we don't need to explicitly add
[[mounts]]
source = "static"
target = "static"
Hugo already adds that implicitly.
But I guess it wouldn't hurt to explicitly add the remaining default mounts to our config, it would probably be clearer for people unfamiliar with Hugo mounts.
Currently absent default mounts include:
[[module.mounts]]
source = 'i18n'
target = 'i18n'
[[module.mounts]]
source = 'static'
target = 'static'
@h-enk What do you think?
But I guess it wouldn't hurt to explicitly add the remaining default mounts to our config, it would probably be clearer for people unfamiliar with Hugo mounts.
I certainly agree /let's do that.
But I guess it wouldn't hurt to explicitly add the remaining default mounts to our config, it would probably be clearer for people unfamiliar with Hugo mounts.
I certainly agree /let's do that.
Description
Files stored in the static dir are not included in the hugo build. For example the favicons are not found.
Steps to reproduce
Run the create hyas project and see if the favicon are found in the logs.
Expected result
The files in the static dir should be added to the public directory
Actual result
The static files are not included