From eca429b15e8f7bbe83f002affdea75d49c33beb3 Mon Sep 17 00:00:00 2001 From: geekifan Date: Mon, 28 Apr 2025 11:44:25 +0800 Subject: [PATCH] split configs --- config/_default/languages.toml | 9 +++++++ config/_default/params.toml | 31 ++++++++++++++++++++++++ hugo.toml | 43 ---------------------------------- 3 files changed, 40 insertions(+), 43 deletions(-) create mode 100644 config/_default/languages.toml create mode 100644 config/_default/params.toml diff --git a/config/_default/languages.toml b/config/_default/languages.toml new file mode 100644 index 0000000..bd8265d --- /dev/null +++ b/config/_default/languages.toml @@ -0,0 +1,9 @@ +[en] + languageName = "English" + languageCode = "en" + weight = 2 + +[zh-CN] + languageName = "中文" + languageCode = "zh-CN" + weight = 1 \ No newline at end of file diff --git a/config/_default/params.toml b/config/_default/params.toml new file mode 100644 index 0000000..0ee6a8e --- /dev/null +++ b/config/_default/params.toml @@ -0,0 +1,31 @@ +theme_version = "5.2.0" +toc = true +avatar = "img/commons/avatar.jpg" +tagline = "A text-focused Jekyll theme" + +[assets] + self_host = false + +[social] + name = "Yifan" + url = "https://github.com/geekifan" + +[[social.links]] + type = "github" + id = "yourusername" # 或直接使用 url = "https://github.com/yourusername" + icon = "fab fa-github" + +[[social.links]] + type = "twitter" + id = "yourhandle" + icon = "fab fa-twitter" + +[[social.links]] + type = "email" + id = "your.email@example.com" # 会被自动分割处理 + icon = "fas fa-envelope" + +[[social.links]] + type = "rss" + icon = "fas fa-rss" + noblank = true # 不在新窗口打开 \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index 7f68112..7c2a0a8 100644 --- a/hugo.toml +++ b/hugo.toml @@ -4,17 +4,6 @@ enableGitInfo = true defaultContentLanguage = "en" defaultContentLanguageInSubdir = false -[languages] - [languages.zh-CN] - languageName = "中文" - languageCode = "zh-CN" - weight = 1 - - [languages.en] - languageName = "English" - languageCode = "en" - weight = 2 - [pagination] pagerSize = 5 @@ -48,35 +37,3 @@ defaultContentLanguageInSubdir = false [[module.imports]] path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5" - -[params] - theme_version = "5.2.0" - toc = true - avatar = "img/commons/avatar.jpg" - tagline = "A text-focused Jekyll theme" - -[params.assets] - self_host = false - -[params.social] - name = "Yifan" - url = "https://github.com/geekifan" - [[params.social.links]] - type = "github" - id = "yourusername" # 或直接使用 url = "https://github.com/yourusername" - icon = "fab fa-github" - - [[params.social.links]] - type = "twitter" - id = "yourhandle" - icon = "fab fa-twitter" - - [[params.social.links]] - type = "email" - id = "your.email@example.com" # 会被自动分割处理 - icon = "fas fa-envelope" - - [[params.social.links]] - type = "rss" - icon = "fas fa-rss" - noblank = true # 不在新窗口打开 \ No newline at end of file