Custom homepage: build error when including an image/figure #810
-
Hello, I would like to render a figure in layouts/partials/home/custom.html The image is located in the assets/ But, when building, I am getting an error: May I have a suggestion how to fix this, please. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hiya! shortcodes are designed to be called from content components, (ie your markdown pages) https://discourse.gohugo.io/t/can-i-call-a-shortcode-from-a-partial/39043 hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Thank you for the information @wolfspyre ! If you would, and be so kind, may I have your suggestion, how to achieve an effect that I hoped to obtain by using the following custom homepage (custom.html) layout, please.
Thank you! |
Beta Was this translation helpful? Give feedback.
Hiya!
shortcodes are designed to be called from content components, (ie your markdown pages)
they’re not intended to be used from within partial templates, really…
https://discourse.gohugo.io/t/can-i-call-a-shortcode-from-a-partial/39043
hope this helps!