CloudCannon / bookshop

📚 A component development workflow for static websites.
MIT License
249 stars 21 forks source link

Can't use Custom Hugo Shortcodes inside Bookshop Component #186

Closed cgranados16 closed 10 months ago

cgranados16 commented 10 months ago

Calling a Custom Hugo Shortcode

_bookshop_name: feature
content: "{{% table %}}  table content {{% /table %}}"

inside a bookshop component triggers an error inside theBookshop Component Browser and Cloudcannon Visual Editor

Failed to render layouts/partials/bookshop/components/feature/feature.hugo.html.
template: partials/bookshop/components/feature/feature.hugo.html: 15: 22:
    executing "partials/bookshop/components/feature/feature.hugo.html" 
at <markdownify>:
    error calling markdownify: "content/_index.md:7:1": failed to extract shortcode: template
for shortcode "table" not found

The live preview renders fine.

cgranados16 commented 10 months ago

Followed the steps in https://github.com/CloudCannon/bookshop/blob/main/guides/hugo-extra-files.md fixed it