summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18n/en.yml3
-rw-r--r--i18n/zh.yml3
-rw-r--r--layouts/partials/components/postnav.html6
3 files changed, 10 insertions, 2 deletions
diff --git a/i18n/en.yml b/i18n/en.yml
index 4391c91a..a62b972a 100644
--- a/i18n/en.yml
+++ b/i18n/en.yml
@@ -10,3 +10,6 @@ footer:
wordCount: '🪦 {{ . }} words are buried here'
licenseStatement: 'Licensed under {{ . }}'
searchInstruction: '⌘+K to search anywhere'
+postNav:
+ latest: 'Latest'
+ categories: 'Categories'
diff --git a/i18n/zh.yml b/i18n/zh.yml
index 38c576e1..6273feb8 100644
--- a/i18n/zh.yml
+++ b/i18n/zh.yml
@@ -10,3 +10,6 @@ footer:
wordCount: '🪦 {{ . }} 字在这里死去'
licenseStatement: '以 {{ . }} 协议授权'
searchInstruction: '⌘+K 在任何地方搜索'
+postNav:
+ latest: '最新'
+ categories: '分类'
diff --git a/layouts/partials/components/postnav.html b/layouts/partials/components/postnav.html
index 207ea99c..0d36d5b1 100644
--- a/layouts/partials/components/postnav.html
+++ b/layouts/partials/components/postnav.html
@@ -1,11 +1,13 @@
<div id="posts-list-navigation">
<ul>
<li class="{{ if eq "/" $.Page.RelPermalink }}active{{ end }}">
- <a href="/">最新</a>
+ <a href="{{ .Site.LanguagePrefix }}/">{{ T "postNav.latest" }}</a>
</li>
+ {{ if eq .Site.Language.Lang "zh" }}
<li class="{{ if eq "/categories/" $.Page.RelPermalink }}active{{ end }}">
- <a href="/categories">分类</a>
+ <a href="{{ .Site.LanguagePrefix }}/categories">{{ T "postNav.categories" }}</a>
</li>
+ {{ end }}
<li id="search-instruction">
<span>{{ T "searchInstruction" }}</span>
</li>