Closed whyboris closed 1 year ago
Hi @whyboris this image has been added way back to the static dir as this was the only way to serve a default image. Removing it at this point is a breaking change we don't want to impose on our current users.
Now there is a solution but it involves non-trival changes to your setup. You would need to import the theme as a Hugo module (rather than git submodule like you are now).
Then you project would need to be init as a module so you can benefit from the module mounts settings of Hugo. Then in your config file:
# config.yaml
module:
imports:
- path: github.com/theNewDynamic/gohugo-theme-ananke
mounts:
- source: layouts
target: layouts
- source: static
target: static
excludeFiles:
- images/*
Thank you for the details. I think I will just add to my build script to rm -rf public/images
😅
Cheers ❤️
Ah ah yes sounds better!
The file
gohugo-default-sample-hero-image.jpg
gets copied into/images
folder when I build my website:I don't need this in my
/public
folder. There must be some way of avoiding it but I'm unsure how. In fact I don't even need a/images
folder as I use/img
.My repo: https://github.com/whyboris/utilitarianism.net
If you have a suggestion, please let me know 🙇 ❤️