Add built-in shortcodes for common usecases #1576

Closed
digitalcraftsman opened this Issue Nov 15, 2015 · 7 comments

Comments

Projects
None yet
5 participants
@digitalcraftsman
Member

digitalcraftsman commented Nov 15, 2015

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.

Follow the forum discussion for more information.

Just a quick compilation of usecases / services (todo list):

  • Twitter
  • Speakerdeck presentations
  • YouTube videos
  • Vimeo videos
  • Github gists
@derekperkins

This comment has been minimized.

Show comment
Hide comment
@derekperkins

derekperkins Nov 20, 2015

Contributor

@digitalcraftsman - that's a good idea and not particularly difficult to implement. If you could figure out what the input options should be and sample output, that'd make it a piece of cake.

Contributor

derekperkins commented Nov 20, 2015

@digitalcraftsman - that's a good idea and not particularly difficult to implement. If you could figure out what the input options should be and sample output, that'd make it a piece of cake.

@digitalcraftsman

This comment has been minimized.

Show comment
Hide comment
@digitalcraftsman

digitalcraftsman Nov 20, 2015

Member

@derekperkins - below you find a list of the syntax that user would use to call the shortcodes. Do you think that something could be improved?

Twitter

To embed a single tweet the user needs to pass a username and the id of the tweet:

{{< tweet spf13 666616452582129664 >}}

Speakerdeck

Required is the id of the slide. This id can be found on the right side of the presentation on Speakerdeck under 'Direct link'

{{< speakerdeck 4e8126e72d853c0060001f97 >}}

YouTube

Just the id of the video is required:

{{< youtube w7Ft2ymGmfc >}}

Vimeo

Just the id of the video is required:

{{< vimeo 146022717 >}}

Gists

Gists would need the owner's username and its unique id:

{{< gist digitalcraftsman 85f59771b5ae1e2091a8 >}}
Member

digitalcraftsman commented Nov 20, 2015

@derekperkins - below you find a list of the syntax that user would use to call the shortcodes. Do you think that something could be improved?

Twitter

To embed a single tweet the user needs to pass a username and the id of the tweet:

{{< tweet spf13 666616452582129664 >}}

Speakerdeck

Required is the id of the slide. This id can be found on the right side of the presentation on Speakerdeck under 'Direct link'

{{< speakerdeck 4e8126e72d853c0060001f97 >}}

YouTube

Just the id of the video is required:

{{< youtube w7Ft2ymGmfc >}}

Vimeo

Just the id of the video is required:

{{< vimeo 146022717 >}}

Gists

Gists would need the owner's username and its unique id:

{{< gist digitalcraftsman 85f59771b5ae1e2091a8 >}}
@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Nov 20, 2015

Member

A comment for the documentation: You only need quoted parameters if you have spaces or very special chars, so this is better:

{{< youtube w7Ft2ymGmfc >}}
Member

bep commented Nov 20, 2015

A comment for the documentation: You only need quoted parameters if you have spaces or very special chars, so this is better:

{{< youtube w7Ft2ymGmfc >}}
@digitalcraftsman

This comment has been minimized.

Show comment
Hide comment
@digitalcraftsman

digitalcraftsman Nov 20, 2015

Member

Thanks for annotating this. I'll update the examples above.

Member

digitalcraftsman commented Nov 20, 2015

Thanks for annotating this. I'll update the examples above.

@digitalcraftsman

This comment has been minimized.

Show comment
Hide comment
@digitalcraftsman

digitalcraftsman Nov 20, 2015

Member

All shortcodes are implemented (including Twitter) and the docs have been written.

Member

digitalcraftsman commented Nov 20, 2015

All shortcodes are implemented (including Twitter) and the docs have been written.

@bep bep closed this in 86dcac6 Nov 24, 2015

@derekperkins

This comment has been minimized.

Show comment
Hide comment
@derekperkins

derekperkins Nov 24, 2015

Contributor

Awesome!

Contributor

derekperkins commented Nov 24, 2015

Awesome!

bramp added a commit to bramp/hugo that referenced this issue Dec 17, 2015

@umtksa

This comment has been minimized.

Show comment
Hide comment
@umtksa

umtksa Jul 23, 2017

how about responsive vimeo and youtube
i have some custom shortcodes here

umtksa commented Jul 23, 2017

how about responsive vimeo and youtube
i have some custom shortcodes here

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment