This shortcode is used to create abbreviations whose titles can be taken from site data or customized.
Become a backer or sponsor to support our work.
1{{< abbr [text] [title] >}}
The [text]
is the rendered text, case-sensitive, which also used as the key of data files.
The [title]
is optional, if present, it’ll be used as the title.
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" >}}.
HugoMods is a collection of third party modules for Hugo.
1{{< abbr "HugoMods" "Third party Hugo modules" >}} is a collection of third party modules for {{< abbr "Hugo" >}}.
HugoMods is a collection of third party modules for Hugo.
1{{< abbr "hugo" >}}
2{{< abbr "foobar" >}}
The hugo and foobar will still be rendered, but with warning messages.
1WARN [abbr] missing title for "hugo"
2WARN [abbr] missing title for "foobar"