YouTube Shortcode Caption Problem

Dear All,

I’ve just started using Hugo and only after a week I managed to develop a blog. However, I’m very new to Hugo and still I don’t understand many things, especially how to modify and adapt shortcodes.

In this particular case, I’m trying to modify the default youtube shortcut code to display caption between tags similar to the code in the default figure shortcut. I other words, how can I pass a named parameter inside a youtube shortcut? Something like {{ youtube KEY caption=""}} that would be displayed exactly the same as {{ figure caption="" }}?

Thank you a lot!

You’re probably better off creating your own shortcode or partial instead of overloading the default one.

Thank you.