Skip to content

Link Resolution Errors on Sites using Subdirectory - Possible Bug? #862

Answered by McShelby
russfeld asked this question in Q&A
Discussion options

You must be logged in to vote

That was an interesting deep dive into Hugo's guts.

Link render hooks are sometimes limited to their use case

This render hook may be unable to resolve destinations created with the ref and
relref shortcodes.

https://discourse.gohugo.io/t/not-able-to-render-images/42948/4

In simple cases where you are using only the path option of the ref/relref shortcode, this can be circumvented by adding your own layouts/shortcodes/relref.html with the following content:

{{- .Get "path" | default (.Get 0) }}

If you also plan to use the additional options lang and outputFormat, you'll have to wait until #850 is implemented.

I am planing to provide overwritten rel/relref shortcodes with the theme that…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@russfeld
Comment options

@McShelby
Comment options

Comment options

You must be logged in to vote
4 replies
@McShelby
Comment options

@russfeld
Comment options

@McShelby
Comment options

@McShelby
Comment options

Answer selected by russfeld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants