Seek help with multilingual support again

I had trouble with sharing images between different versions of different languages of the same post a while back and I got help to resolve it.

Unfortunately, the solution does not seem to work for this site: GitHub - xinxinxiangrong-family/xinxinxiangrong-family.github.io at hugo

I suspect this is because I am using the figure short code for this one. Any suggestion on how to fix it? :pray:

You are correct. The PaperMod theme provides its own figure shortcode, and it has the same shortcomings as its image render hook. Please log another issue with the PaperMod theme, but note that this theme hasn’t been maintained very well over the past few months.

You can fix this by creating your own figure shortcode that overrides the theme’s shortcode:

mkdir -p layouts/shortcodes
touch layouts/shortcodes/figure.html

Then copy the source for Hugo’s embedded figure shortcode into the file you just created.

The documentation for using the shortcode is here:
https://gohugo.io/content-management/shortcodes/#figure

1 Like