diff --git a/layouts/shortcodes/blocks/feature.html b/layouts/shortcodes/blocks/feature.html index 6fe4ca33d..bdda3f452 100644 --- a/layouts/shortcodes/blocks/feature.html +++ b/layouts/shortcodes/blocks/feature.html @@ -1,5 +1,4 @@ {{ $icon := .Get "icon" | default "fa-lightbulb" -}} -{{ $url_text := .Get "url_text" -}}
@@ -10,5 +9,5 @@

{{ .Inner }}
-{{ with .Get "url" }}

{{ with $url_text }}{{ $url_text }}{{ else }}{{ T "ui_read_more" }}{{ end }} …

{{ end }} +{{ with .Get "url" }}

{{ with $.Get "url_text" }}{{ . }}{{ else }}{{ T "ui_read_more" }}{{ end }}

{{ end }}

diff --git a/userguide/content/en/docs/adding-content/shortcodes/index.md b/userguide/content/en/docs/adding-content/shortcodes/index.md index be506f0bc..697b9f991 100644 --- a/userguide/content/en/docs/adding-content/shortcodes/index.md +++ b/userguide/content/en/docs/adding-content/shortcodes/index.md @@ -129,6 +129,7 @@ We do a [Pull Request](https://github.com/gohugoio/hugo/pulls) contributions wor | ---------------- |------------| ------------| | title | | The title to use. | url | | The URL to link to. +| url_text | The [language parameter](/docs/language/#internationalization-bundles) value of [`ui_read_more`](https://github.com/google/docsy/blob/main/i18n/en.toml) | The link text to use. | icon | | The icon class to use.