Is your feature request related to a problem? Please describe.
Because of borked behaviour of Hugo when used at a base URL with sub path, the figure short code when used needs to explicitly include the /workshop/content/ prefix in the src attribute when referring to static files placed in the workshop/static directory of the workshop files. This requirement isn't documented, also doesn't seem right to have a static path prefix encoded everywhere.
Describe the solution you'd like
Document how to use images when using the Hugo renderer, and provide a data variable that can be used in place of the static prefix.
For example, if an image file was placed in the workshop/static/images directory, then instead of needing to say:
This presumes nesting of params like this works in Hugo as there are tricks needed with quoting to actually have that work, so will need testing.
Describe alternatives you've considered
The alternative is to use relative paths. For example:
{{< figure src="../images/image.png" >}}
Additional information
Note that this only applies to image files placed in the workshop/static directory. If Hugo page bundles are used then the image can be placed in the page bundle directory and can be reference with a relative path instead.
Is your feature request related to a problem? Please describe.
Because of borked behaviour of Hugo when used at a base URL with sub path, the
figure
short code when used needs to explicitly include the/workshop/content/
prefix in thesrc
attribute when referring to static files placed in theworkshop/static
directory of the workshop files. This requirement isn't documented, also doesn't seem right to have a static path prefix encoded everywhere.Describe the solution you'd like
Document how to use images when using the Hugo renderer, and provide a data variable that can be used in place of the static prefix.
For example, if an image file was placed in the
workshop/static/images
directory, then instead of needing to say:one could perhaps use:
This presumes nesting of params like this works in Hugo as there are tricks needed with quoting to actually have that work, so will need testing.
Describe alternatives you've considered
The alternative is to use relative paths. For example:
Additional information
Note that this only applies to image files placed in the
workshop/static
directory. If Hugo page bundles are used then the image can be placed in the page bundle directory and can be reference with a relative path instead.