Shortcodes are small and reusable code snippets for a variety of common usecases: to easily embed a Youtube video, your last presentation on Speakerdeck, a Github gist for a tutorial and so on.
Why shouldn’t we add a number of shortcodes for the most popular usecases and services. New users could use them out of the box without the need of creating them manually. And API usually don’t change their design radically from one day to the other. So maintaince would not be a big issue.
Personally I’m for keeping Hugo [and the sites it generates] as lean & mean as possible. I get a bit OCD about removing unused ‘bloat’ sometiimes. So, for me, a load of extra shortcodes I wasn’t using would be just that; extra bloat.
That said, I’m not into re-inventing the wheel either. So, maybe a separate repo for user-contributed shortcodes would be a useful resource.
I’ll have a look at the options that could be added to the embeddable video player. It should be hard to add them with a few optional shortcode parameters.
I’ve created a pull request to add the option to autoplay a video a the page was loaded.
However, after googling for examples for the integration of a custom thumbnail I came to the conclusion that the code of the shortcode logic would end up very messy. I didn’t found a path as parameter that could be appended to the url. Instead I would need to add a HTML wrapper around the current code and only if the parameter is set.
Thanks @digitalcraftsman, wow that was fast! I really appreciate your help.
I’ll check out your pull request. Meanwhile, I guess if I must have a poster image, I am down to using the youtube iframe embed code, is that right? And yes, you are correct in that custom thumbnails are messy and not recommended for youtube embed.