Hello,
I created shortcodes for vimeo, youtube, and soundcloud.
I know that the vimeo and youtube shortcodes are built in, and just formatted them according to my needs (I want to show video and audio embeds in fancybox).
on the website, all shortcodes including the youtube and vimeo ones don’t appear as links, but are written out as in the markdown file. So I just get a list of these
{{< vimeo 226888246 Plastic_Girls >}}
{{< soundcloud 343118668& Vakula >}
Hm… any ideas as to why that is, and how to fix it?
Thanks!
Thanks for looking into it… since I am fairly new to all this and am not sure what you would look for, I shoved all the files to here.
Much appreciated~!
That shortcode is missing a closing curly brace. But also, it has an ampersand in the parameter. That must be quoted. I know that, because it said so in the log:
Change detected, rebuilding site
2017-09-27 12:06 -0700
Source changed "/home/maiki/projects/temp/bbs-web/content/col2-text.md": RENAME
Source changed "/home/maiki/projects/temp/bbs-web/content/col2-text.md": CREATE
Source changed "/home/maiki/projects/temp/bbs-web/content/col2-text.md": WRITE
ERROR 2017/09/27 12:06:22 col2-text.md:21: unrecognized character in shortcode action: U+0026 '&'. Note: Parameters with non-alphanumeric args must be quoted
ERROR 2017/09/27 12:06:22 col2-text.md:21: unrecognized character in shortcode action: U+0026 '&'. Note: Parameters with non-alphanumeric args must be quoted
ERROR 2017/09/27 12:06:22 col2-text.md:21: unrecognized character in shortcode action: U+0026 '&'. Note: Parameters with non-alphanumeric args must be quoted
I quoted it and it began working:
{{< soundcloud "343118668&" Vakula >}}
Changing content and checking the log to see errors is the first step to debugging a template.
Oops… hehe… it looks like keeping an eye on the logs is a good idea –.–;; . The Hugo mystery is solved, but the quotes also prevent the link from directing to soundcloud properly.
Ironically what worked is placing the & part in the shortcode itself, and just use the numerical part of the track id in the post, so I can avoid the quoting. I didn’t realize before that the & is in all soundcloud embed links .
Anyway, thanks so much for you help, it works smoothly now!