mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Merge commit 'b3d87dd0fd746f07f9afa6e6a2969aea41da6a38'
This commit is contained in:
@@ -10,7 +10,7 @@ keywords: []
|
||||
> To override Hugo's embedded `ref` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
|
||||
|
||||
> [!note]
|
||||
> When working with the Markdown [content format], this shortcode has become largely redundant. Its functionality is now primarily handled by [link render hooks], specifically the embedded one provided by Hugo. This hook effectively addresses all the use cases previously covered by this shortcode.
|
||||
> When working with Markdown, this shortcode is obsolete. Instead, use a [link render hook] that resolves the link destination using the `GetPage` method on the `Page` object. You can either create your own, or simply enable the [embedded link render hook]. The embedded link render hook is automatically enabled for multilingual single-host projects.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -56,6 +56,7 @@ Rendered:
|
||||
{{% include "_common/ref-and-relref-error-handling.md" %}}
|
||||
|
||||
[content format]: /content-management/formats/
|
||||
[link render hooks]: /render-hooks/images/#default
|
||||
[embedded link render hook]: /render-hooks/links/#default
|
||||
[link render hook]: /render-hooks/links/
|
||||
[Markdown notation]: /content-management/shortcodes/#notation
|
||||
[source code]: {{% eturl ref %}}
|
||||
[source code]: {{% eturl relref %}}
|
||||
|
@@ -10,7 +10,7 @@ keywords: []
|
||||
> To override Hugo's embedded `relref` shortcode, copy the [source code] to a file with the same name in the `layouts/shortcodes` directory.
|
||||
|
||||
> [!note]
|
||||
> When working with the Markdown [content format], this shortcode has become largely redundant. Its functionality is now primarily handled by [link render hooks], specifically the embedded one provided by Hugo. This hook effectively addresses all the use cases previously covered by this shortcode.
|
||||
> When working with Markdown, this shortcode is obsolete. Instead, use a [link render hook] that resolves the link destination using the `GetPage` method on the `Page` object. You can either create your own, or simply enable the [embedded link render hook]. The embedded link render hook is automatically enabled for multilingual single-host projects.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -56,6 +56,7 @@ Rendered:
|
||||
{{% include "_common/ref-and-relref-error-handling.md" %}}
|
||||
|
||||
[content format]: /content-management/formats/
|
||||
[link render hooks]: /render-hooks/links/
|
||||
[embedded link render hook]: /render-hooks/links/#default
|
||||
[link render hook]: /render-hooks/links/
|
||||
[Markdown notation]: /content-management/shortcodes/#notation
|
||||
[source code]: {{% eturl relref %}}
|
||||
|
@@ -29,19 +29,27 @@ Hugo renders this to:
|
||||
|
||||
## Arguments
|
||||
|
||||
id
|
||||
: (string) The video `id`. Optional if the `id` is provided as a positional argument as shown in the example above.
|
||||
|
||||
allowFullScreen
|
||||
: {{< new-in 0.146.0 />}}
|
||||
: (`bool`) Whether the `iframe` element can activate full screen mode. Default is `true`.
|
||||
|
||||
class
|
||||
: (`string`) The `class` attribute of the wrapping `div` element. Adding one or more CSS classes disables inline styling.
|
||||
|
||||
id
|
||||
: (`string`) The `id` of the Vimeo video
|
||||
loading
|
||||
: {{< new-in 0.146.0 />}}
|
||||
: (`string`) The loading attribute of the `iframe` element, either `eager` or `lazy`. Default is `eager`.
|
||||
|
||||
title
|
||||
: (`string`) The `title` attribute of the `iframe` element.
|
||||
|
||||
If you provide a `class` or `title` you must use a named parameter for the `id`.
|
||||
Here's an example using some of the available arguments:
|
||||
|
||||
```text
|
||||
{{</* vimeo id=55073825 class="foo bar" title="My Video" */>}}
|
||||
{{</* vimeo id=55073825 allowFullScreen=false loading=lazy */>}}
|
||||
```
|
||||
|
||||
## Privacy
|
||||
|
@@ -70,7 +70,7 @@ start
|
||||
title
|
||||
: (`string`) The `title` attribute of the `iframe` element. Defaults to "YouTube video".
|
||||
|
||||
Example using some of the above:
|
||||
Here's an example using some of the available arguments:
|
||||
|
||||
```text
|
||||
{{</* youtube id=0RKpf3rK57I start=30 end=60 loading=lazy */>}}
|
||||
|
Reference in New Issue
Block a user