Closed Bas-Man closed 4 years ago
Hi @Bas-Man The youtube shortcode is a Hugo internal template, not a theme thing, but it works as far as I know. I used it just a few days ago. You might have better luck on the Hugo forums. However, If you can post a link to your repo we can have a look for you.
Ah. In that case I will test using HUGO_ENV set to production. It appears internal templates don't load if it's not built as production. I will test tomorrow morning. Thanks for the quick response. I will let you know the result tomorrow.
FYI: That's not so. The internal templates should load no matter the environment.
Regarding templates: There is some code in this theme to prevent things like google analytics, so I probably overly generalized. My mistake.
markdown code
YouTube:
{{< youtube R_-oGJBg3nw >}}
[GitHub](https://github.com/Godsont/Cookie-Consent-Banner)
generated html
You can find the references below:</p>
<p>YouTube:
</p>
<p><a href="https://github.com/Godsont/Cookie-Consent-Banner">GitHub</a></p>
I am running the following version: Hugo Static Site Generator v0.73.0/extended darwin/amd64 BuildDate: unknown
I could of course just be making a simple mistake.
I tried your video and it works for me. I published a page on the demo site with another video: https://gohugo-ananke-theme-demo.netlify.app/post/chapter-1/
I have had to use a custom short code. I will keep looking into it for a little while.
I think I have found my issue. Related to privacy settings. I will have to test later today to confirm. I found it after looking at the actual YouTube template code.
Sorry. This was due my over zealous attempt to provide privacy. in the config.toml I had added.
[privacy]
[privacy.youtube]
disable = true
This can be closed.
Glad you figured it out!
I understand this is closed, however, it might happen a lot. I too was "over-zealous" in my privacy settings and had YouTube disabled. It might be of value to put it in the documentation. Thank you, Bas-man.
Hi.
I have just tried to add my first youtube link using the shortcode for youtube. Unfortunately it does not appear to work. I found this reference.
https://rguske.github.io/post/youtube-hugo-shortcode-workaround-when-youtube-wont-work/ and this also https://github.com/eueung/hugo-casper-two/issues/5#
Is the youtube shortcode also broken with this theme?