I’m trying to invoke a shortcode in test.md and I get an error. If it worked, it should show a string “Hello World” on the screen.
Instead, I get: failed to extract shortcode: template for shortcode “myshortcode” not found
I tried both /layouts/myshortcode.html and /layouts/partials/myshortcode.html and even adding myshortcode.html in the layouts folder of the theme I’m using. In all three attempts hugo didn’t find the file. I searched around a bit and couldn’t find a solution to this.
I created layouts/shortcodes, layouts/file.html and layouts/partials and none of them work. It’s in the repo. The current one isn’t in layouts/shortcode, but I can push this change to the repo for you to see that it isn’t working even if I do this.