Hacker News new | ask | show | jobs
by faraixyz 491 days ago
I’ve done this too https://its.ffg.co.zw/bikeshed/components/lite-yt/

I’d recommend using HasShortcode in the head so the script is only loaded if the post has a shortcode.

Also, use {{/* and */}} to stop Hugo from trying to render a template tag so you can include it in a code snippet.

2 comments

btw do you know if possible with twitter? i couldn't find anything on that.
thanks. TIL abt HasShortCode.