Fix the figure shortcode for multilingual site #1777
+12
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



What does this PR change? What problem does it solve?
Fix the figure shortcode for multilingual site
The figure shortcode now use RelPermalink instead of the link provided by the user. Using the link provided by the user caused the image not to load when using local url for translated the site was translated. When you translated the site the url is modified (eg: site/fr/post/article/), if you tried to load the image located at "site/post/article/img.png" using {{<figure src="img.png" >}} the image would not load since the resulting link would be "site/fr/post/article/img.png".
This would not work for site using translation by file name https://gohugo.io/content-management/multilingual/#translation-by-file-name
Which is inconsistent with the markdown behaviour where local path works fine.
Was the change discussed in an issue or in the Discussions before?
No, it just happened that the default hugo shortcode was working while the paperMod's one was not loading my image on my translated pages
PR Checklist