Hi all!
As I understand useEmbedded = auto with [markup.goldmark.renderHooks.link]:
The embedded link render hook resolves internal Markdown destinations by looking for a matching page, falling back to a matching page resource, then falling back to a matching global resource. Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination.
For a multilingual site we have been using markdown links like [a link]({{< relref "/page" >}}.
This works well if I have a translation of that page, such that links will stay in the correct lang.
content
├── getting_started
│ ├── index.fr.md
│ └── index.md
├── apage
│ ├── index.fr.md
│ └── index.md
apage/index.fr.md
[a link]({{< relref "/getting_started" >}})
will link to the page SITE/fr/getting_started.
while
apage/index.md
[a link]({{< relref "/getting_started" >}})
will link to the page SITE/getting_started.
I was under the impression that using the renderHooks.link with useEmbedded = auto would allow me to use simpler markdown links and still have things work similar to relref.
But:
apage/index.fr.md
[a link](/getting_started>)
will link to the page SITE/getting_started. (as opposed to SITE/fr/getting_started).
Was I mistaken or is there a configuration perhaps that I’m missing somewhere?
Relevant lang section of hugo.toml:
...
[languages]
[languages.en]
languageCode = 'en-US'
languageName = 'English'
timeZone = 'America/New_York'
title = 'RawPedia'
weight = 1
[languages.en.pagination]
path = 'page'
[languages.fr]
languageCode = 'fr'
languageName = 'Français'
timeZone = 'America/New_York'
title = 'RawPedia'
weight = 1
[languages.fr.pagination]
path = 'page'
...