Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAndrew Zenk <andrew@andrewzenk.com>2020-12-02 14:53:53 +0300
committerGitHub <noreply@github.com>2020-12-02 14:53:53 +0300
commit4fc918e02cfc7f260d6312248ff9d33e95b27943 (patch)
tree64621d7e7e447b644c8456503e0648e6e8ed9a0e /docs
parent0ad378b09cea90a2a70d7ff06af668abe22475a1 (diff)
tpl: Add title parameter to YouTube shortcode
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/content-management/shortcodes.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md
index a298bc425..2b4d0d632 100644
--- a/docs/content/en/content-management/shortcodes.md
+++ b/docs/content/en/content-management/shortcodes.md
@@ -398,6 +398,13 @@ Furthermore, you can automatically start playback of the embedded video by setti
{{</* youtube id="w7Ft2ymGmfc" autoplay="true" */>}}
{{< /code >}}
+For [accessibility reasons](https://dequeuniversity.com/tips/provide-iframe-titles), it's best to provide a title for your YouTube video. You can do this using the shortcode by providing a `title` parameter. If no title is provided, a default of "YouTube Video" will be used.
+
+{{< code file="example-youtube-input-with-title.md" >}}
+{{</* youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" */>}}
+{{< /code >}}
+
+
#### Example `youtube` Output
Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup: