From 38df51c80f2214ff990eeed1f37d2e3fe15a5a8a Mon Sep 17 00:00:00 2001 From: PCloud Date: Mon, 16 Sep 2024 20:55:25 +0100 Subject: [PATCH] fix: hugo deprecation features --- exampleSite/config/_default/hugo.en.toml | 2 -- exampleSite/config/_default/hugo.zh-cn.toml | 2 -- exampleSite/config/_default/pagination.toml | 2 ++ layouts/partials/header.html | 4 ++-- layouts/shortcodes/version.html | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 exampleSite/config/_default/pagination.toml diff --git a/exampleSite/config/_default/hugo.en.toml b/exampleSite/config/_default/hugo.en.toml index 9abc9c245..66860f008 100644 --- a/exampleSite/config/_default/hugo.en.toml +++ b/exampleSite/config/_default/hugo.en.toml @@ -5,7 +5,5 @@ languageCode = "en" languageName = "English" # whether to include Chinese/Japanese/Korean hasCJKLanguage = false -# default amount of posts in each pages -paginate = 12 # copyright description used only for seo schema copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." diff --git a/exampleSite/config/_default/hugo.zh-cn.toml b/exampleSite/config/_default/hugo.zh-cn.toml index 5301181ff..66c0599c7 100644 --- a/exampleSite/config/_default/hugo.zh-cn.toml +++ b/exampleSite/config/_default/hugo.zh-cn.toml @@ -5,7 +5,5 @@ languageCode = "zh-CN" languageName = "简体中文" # 是否包括中日韩文字 hasCJKLanguage = true -# 默认每页列表显示的文章数目 -paginate = 12 # 版权描述,仅仅用于 SEO copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." diff --git a/exampleSite/config/_default/pagination.toml b/exampleSite/config/_default/pagination.toml new file mode 100644 index 000000000..cbd3bc329 --- /dev/null +++ b/exampleSite/config/_default/pagination.toml @@ -0,0 +1,2 @@ +# The number of pages per pager +pagerSize = 12 \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 23a72ba6b..c227be9be 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -41,7 +41,7 @@ {{- if .Site.Menus.main -}} {{- end -}} - {{- if .Site.IsMultiLingual -}} + {{- if hugo.IsMultilingual -}} {{- end -}} - {{- if .Site.IsMultiLingual -}} + {{- if hugo.IsMultilingual -}}