To create abbreviations with titles.
1{{< abbr [text] [title] >}}
text
Position | Name | Type | Required | Default | Since |
---|---|---|---|---|---|
#0 | text | string | ✓ | - | - |
The rendered text, case-sensitive, which also used as the key of data files.
title
Position | Name | Type | Required | Default | Since |
---|---|---|---|---|---|
#1 | title | string | - | - | - |
Define the title in-place instead of reading it from data files.
The data files should be placed under the data/abbreviations
folder, and naming it in site language code, such as data/abbreviations/en.toml
for English site.
1Hugo = "The world's fastest framework for building static websites"
2HugoMods = "Hugo Modules"
The Hugo
and HugoMods
on above example data file are the text
(key) of the shortcode.
Let’s say the data file as same as the above example data file.
1{{< abbr "HugoMods" >}} is a collection of third party modules for {{< abbr "Hugo" >}}.
1{{< abbr "HugoMods" "Third party Hugo modules" >}} is a collection of third party modules for {{< abbr "Hugo" >}}.
1The {{< abbr "hugo" >}} and {{< abbr "foobar" >}} will still be rendered, but without titles and will got the following similar warning messages.
1WARN [abbr] missing title for "hugo"
2WARN [abbr] missing title for "foobar"