Skip to content

Image render hook path resolution needs fixing #10

@RadioPotin

Description

@RadioPotin

I've come across a weird behaviour that is probably due to the image render-hook path resolution inside the ananke theme.

The bug made images present in the index.html template to not render when the website is in english and in the production environment. Unwanted behaviour did not happen when building locally.

Either one of the following could help for fixing that behaviour:

  • check the image render hook of the ananke theme, fix if needed
  • hugo configuration, maybe there needs to be a relative path to the public /images subdirectory to be added to the configuration of the english version of the website
  • deployment environment mentions a base URL of the following form, consider removing the slash and adapting links ?
run: |
  hugo \
    --gc \
    --minify \
    --baseURL "${{ steps.pages.outputs.base_url }}/"

My quick fix was to enable defaultLanguageContentInSubdir = true inside Hugo's config file and use relative paths for images that are inserted in the templates. That way both the english and french versions of the website use rel paths to resolve images when building.

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem rightwontfixThis will not be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions