diff options
author | digitalcraftsman <digitalcraftsman@users.noreply.github.com> | 2015-11-24 22:22:58 +0100 |
---|---|---|
committer | Anthony Fok <foka@debian.org> | 2015-11-29 22:01:31 -0700 |
commit | 2e3d5c2df694a631fffd6e51e8e028af5b6f2f47 (patch) | |
tree | 94bbd486590cc40f2bdb604c82ee7b6cb6c8d648 /docs | |
parent | cf732940a31cd883d937f8e3fd47bba0ac84f923 (diff) |
Docs: improve shortcodes page
See #1613
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/extras/shortcodes.md | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/docs/content/extras/shortcodes.md b/docs/content/extras/shortcodes.md index ae3b16619..755ae255b 100644 --- a/docs/content/extras/shortcodes.md +++ b/docs/content/extras/shortcodes.md @@ -103,8 +103,6 @@ closing shortcode. <span style="color: #f92672"></div></span> <span style="color: #f92672"></section></span> -*** - ### figure `figure` is simply an extension of the image capabilities present with Markdown. @@ -136,8 +134,6 @@ closing shortcode. </figcaption> </figure> -*** - ### ref, relref These shortcodes will look up the pages by their relative path (e.g., @@ -165,57 +161,45 @@ Assuming that standard Hugo pretty URLs are turned on. <a href="/blog/neat">Neat</a> <a href="/about/#who:c28654c202e73453784cfd2c5ab356c0">Who</a> -*** - ### Twitter You want to include a single tweet into your blog post? Everything you need is the URL of the tweet: - https://twitter.com/spf13/status/666616452582129664 +https://twitter.com/spf13/status/666616452582129664 Pass the tweet's id from the URL as parameter to the shortcode as shown below: {{</* tweet 666616452582129664 */>}} -*** - ### Youtube This shortcode embeds a responsive video player for Youtube videos. Only the id of the video is required: - https://www.youtube.com/watch?v=w7Ft2ymGmfc +https://www.youtube.com/watch?v=w7Ft2ymGmfc Copy the id from behind `v=` and pass it the shortcode: {{</* youtube w7Ft2ymGmfc */>}} - -*** - ### Vimeo Adding a video from Vimeo is equivalent to the Youtube shortcode above. Extract the id from the URL - https://vimeo.com/channels/staffpicks/146022717 +https://vimeo.com/channels/staffpicks/146022717 and pass it to the shortcode: {{</* vimeo 146022717 */>}} -*** - ### Github gists Including code snippets with Github gists while writing a tutorial is common situation bloggers face. With a given URL of the gist - https://gist.github.com/spf13/7896402 +https://gist.github.com/spf13/7896402 pass the owner and the id of the gist to the shortcode: - -{{</* gist spf13 7896402 */>}} - -*** + {{</* gist spf13 7896402 */>}} ### Speakerdeck @@ -228,8 +212,6 @@ Extract the value from the field `id` and pass it to the shortcode: {{</* speakerdeck 4e8126e72d853c0060001f97 */>}} -*** - ## Creating your own shortcodes To create a shortcode, place a template in the layouts/shortcodes directory. The |