Skip to content

Commit 7721de5

Browse files
committed
Migrate to new language methods and config options since Hugo v0.158.0
1 parent f23bda5 commit 7721de5

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ special paths:
3636

3737
## Generating the Site
3838

39-
First, ensure the **extended version** of Hugo v0.144.0 or later is installed.
39+
First, ensure the **extended version** of Hugo v0.158.0 or later is installed.
4040
The installation instructions are available [here][hugo-install].
4141
- The extended version is required because this site has SCSS files, which only
4242
the extended version can handle.

config/_default/languages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
en:
2-
languageName: "English"
2+
label: "English"
33
weight: 1
44
contentDir: 'content/en'
55
title: "Leo3418's Personal Site"
66
zh:
7-
languageName: "简体中文"
7+
label: "简体中文"
88
weight: 2
99
contentDir: 'content/zh'
1010
title: "Leo3418 的个人网站"

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<https://github.com/mmistakes/minimal-mistakes>
66
-->` }}
77

8-
<html lang="{{ .Language.LanguageCode }}">
8+
<html lang="{{ .Language.Locale }}">
99
<head>
1010
{{- partial "head.html" . }}
1111
</head>

layouts/partials/masthead.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<a lang="{{ .Language.Lang }}"
7070
href="{{ .RelPermalink }}">
7171
{{- end }}
72-
{{- .Language.LanguageName -}}
72+
{{- .Language.Label -}}
7373
</a>
7474
</li>
7575
{{- end }}

0 commit comments

Comments
 (0)