Hi, I’m trying to use content import via a Hugo module configuration.
This works fine for pure text, but when I try to combine text in the .md file with a local image via ![image info](./localimage.svg)
, the image link is broken when looking to the generated Hugo website.
Only when I change the path to the full relative path for the generated website, like ![image info](/fullpathto/localimage.svg)
, the image is proper shown.
Is this not supported? Or is there some extra tricks/configuration needed to make this work?
More context:
- the content import is from documentation made by colleagues in another git project (a docs subfolder)
- in there I just add the go.mod file with needed git reference and the .md files get extended with a proper Hugo front matter
- for the colleagues it is logical to be able to create documentation with local images added to their .md files, so they can validate their work locally
- the idea was to collect this documentation from the different git projects in the central Hugo website git project via hugo modules
- this works perfect for pure text, but at first sight not for locally added images
- I was expecting that local images, which proper appear next to the .md files in the generated _vendor folder with
hugo mod vendor
, were also part of the “virtual file system” generated by the Hugo/go modules and could still be accessed with the simple./localimage.svg
path.
Can somebody help with more experience in using Hugo modules?
Kind Regards, Patrik