feat(glossary): provide basic term glossary (#869)

* feat(glossary): provide basic term glossary

Enabled a site-wide terminology glossary.

* Added the `term` shortcode displaying term definition.
* Added the /glossary page showing all term definitions.
* Enabled a simplistic search of term definitions.

* refactor(glossary): update glossary page links and add callout for Hugo support

- Removed the glossary entry from the menu and adjusted weights for subsequent items.
- Added informational callouts in the glossary documentation for multiple languages, directing users to the Hugo Glossary Quick Reference.
- Updated links in the glossary documentation to point to the correct pages.

* fix(glossary): update links to glossary page format across multiple languages

- Changed links in the glossary documentation to use Hugo's relref format for consistency.
- Updated links in Persian, Japanese, English, and Simplified Chinese glossary pages.

---------

Co-authored-by: Xin <5097752+imfing@users.noreply.github.com>
Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
yuri
2026-01-19 23:33:09 +01:00
committed by GitHub
parent 66a9d98630
commit 5028140432
28 changed files with 461 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -43,6 +43,12 @@ body {
@apply hx:outline-none hx:ring-2 hx:ring-primary-200 hx:ring-offset-1 hx:ring-offset-primary-300 hx:dark:ring-primary-800 hx:dark:ring-offset-primary-700;
}
@layer base {
abbr:where([title]) {
cursor: help;
}
}
@import "./typography.css";
@import "./highlight.css";
@import "./components/cards.css";

View File

@@ -18,4 +18,20 @@
{{- $output = $output | merge (dict $pageLink (dict "title" $pageTitle "data" $data)) -}}
{{- end -}}
{{/* Extract glossary data entries */}}
{{- $glossaryEntries := dict -}}
{{- with (index .Site.Data .Site.Language.Lang "termbase") -}}
{{- range . -}}
{{- $entry := cond (.abbr) (printf "%s %s %s" .abbr .term .definition) (printf "%s %s" .term .definition) -}}
{{- $glossaryEntries = $glossaryEntries | merge (dict .term $entry) -}}
{{- end -}}
{{- end -}}
{{- $glossary := dict
"title" "Glossary"
"data" $glossaryEntries
-}}
{{- $output = $output | merge (dict (relLangURL "glossary") $glossary )}}
{{- $output | jsonify -}}