mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-11 03:13:30 +00:00
1.6 KiB
Executable File
1.6 KiB
Executable File
title, linkTitle, description, categories, keywords
| title | linkTitle | description | categories | keywords |
|---|---|---|---|---|
| Vimeo shortcode | Vimeo | Embed a Vimeo video in your content using the vimeo shortcode. |
{{< note >}}
To override Hugo's embedded vimeo shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
[source code]: {{% eturl vimeo %}} {{< /note >}}
Example
To display a Vimeo video with this URL:
https://vimeo.com/channels/staffpicks/55073825
Include this in your Markdown:
{{</* vimeo 55073825 */>}}
Hugo renders this to:
{{< vimeo 55073825 >}}
Arguments
- class
- (
string) Theclassattribute of the wrappingdivelement. Adding one or more CSS classes disables inline styling. - id
- (
string) Theidof the Vimeo video - title
- (
string) Thetitleattribute of theiframeelement.
If you provide a class or title you must use a named parameter for the id.
{{</* vimeo id=55073825 class="foo bar" title="My Video" */>}}
Privacy
Adjust the relevant privacy settings in your site configuration.
{{< code-toggle config=privacy.vimeo />}}
- disable
- (
bool) Whether to disable the shortcode. Default isfalse. - enableDNT
- (
bool) Whether to block the Vimeo player from tracking session data and analytics. Default isfalse. - simple
- (
bool) Whether to enable simple mode. Iftrue, the video thumbnail is fetched from Vimeo and overlaid with a play button. Clicking the thumbnail opens the video in a new Vimeo tab. Default isfalse.
The source code for the simple version of the shortcode is available [here].
[here]: {{% eturl vimeo_simple %}}