diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 428ac2a8..91fcfcc9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -97,7 +97,9 @@ dateFormatToUse = "2006-01-02" [[menu.main]] identifier = "zh" - name = '' + pre = '' + name = "" + title = "简体中文" url = "https://hugo-loveit-zh.netlify.com" weight = 5 diff --git a/exampleSite/zh/config.toml b/exampleSite/zh/config.toml index b2c9c725..701b5027 100644 --- a/exampleSite/zh/config.toml +++ b/exampleSite/zh/config.toml @@ -97,7 +97,9 @@ dateFormatToUse = "2006-01-02" [[menu.main]] identifier = "en" - name = '' + pre = '' + name = "" + title = "English" url = "https://hugo-loveit-en.netlify.com" weight = 5 diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 85edadac..1dd2a298 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,7 +10,7 @@ {{- $currentPage := . }} {{- range .Site.Menus.main -}} - {{- .Name | safeHTML -}} + {{- .Pre | safeHTML }}{{ .Name -}} {{- end -}}