Compare commits

...

2 Commits

Author SHA1 Message Date
Abby Henríquez Tejera
49bc0051c3
Merge 709efac637 into 60984fd136 2023-12-16 05:32:37 -08:00
Abby Henríquez Tejera
709efac637
Localize menu items with translation tables
In the [Hugo documentation](https://gohugo.io/content-management/multilingual/#use-translation-tables) it explains using translation tables as a possible way of localizing menu entries.

This basically uses the menu identifier as a language key for the name of the entry, and is present in the [example menu template](https://gohugo.io/templates/menu-templates/#example).

This change basically gives the same functionality to PaperMod.
2023-08-14 21:42:41 +02:00

View File

@ -130,7 +130,7 @@
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
{{- .Pre }}
{{- .Name -}}
{{- or (T .Identifier) .Name -}}
{{ .Post -}}
</span>
{{- if (findRE "://" .URL) }}&nbsp;