hugo
hugo copied to clipboard
Issue with overlapping file mounts
I'm not sure what, but I see some odd behaviour when using it. Need to look into it.
Note that is is about multiple, e.g. layouts mount in the same module -- not multiple modules (which I use all the time).
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.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
I can vouch for having this issue, especially with a multi-lingual site. When making multiple mounts from, say, the local (project) module, the behavior of the union file system is non-deterministic - e.g., sometimes I get files from the first mount, sometimes I get files from the second mount, etc.
This is especially relevant in a multi-lingual site where the content directories are mounted from the local project space, and there is module path overlap.
I'm happy to provide further specifics of what I see if it's helpful, but sounds like it's already a known issue
@shauntarves, If you can put together a small demo site that reproduces the issue, it would be helpful.
Hi @moorereason ,
Maybe I am just generally having issues understanding how the union virtual filesystem works. If I have the following content directory:
support/
index.md
images/
banana.png
And then I import a module which attempts to override the banana.png with its own version, does that work? I've tried all kinds of import mount configurations, but it just doesn't seem to take. For example:
[[module.imports]]
path = "github.com/starves/efe"
disable = false
[[module.imports.mounts]]
source = "content/support/images"
target = "content/support/images"
[[module.imports.mounts]]
source = "content/support/images/banana.png"
target = "content/support/images/banana.png"
[[module.imports.mounts]]
source = "content/support"
target = "content/support"
Any thoughts?
@bep Any chance you can help on this?