Skip to content

Commit 0064216

Browse files
committed
refactor: 重构 Hugo 站点配置与内容结构
- 移除示例文章及相关图片,清理默认内容 - 将菜单配置从内容文件移至统一的 languages.toml 配置 - 在 config.toml 中明确定义输出格式 - 优化中文安装指南中的路径引用,使用 %USERPROFILE% 环境变量 - 简化首页和页面文件,移除冗余的菜单配置
1 parent 9c0f9ee commit 0064216

21 files changed

Lines changed: 70 additions & 328 deletions

File tree

config/_default/config.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ hasCJKLanguage = true
1515
disqusShortname = ""
1616

1717
[pagination]
18-
pagerSize = 5
18+
pagerSize = 5
19+
20+
[outputs]
21+
home = ["HTML", "RSS", "JSON"]
22+
page = ["HTML"]
23+
section = ["HTML", "RSS"]
24+
taxonomy = ["HTML", "RSS"]
25+
term = ["HTML", "RSS"]

config/_default/languages.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ contentDir = "content/zh-cn"
77
weight = 1
88
[zh-cn.params.sidebar]
99
subtitle = "我的数字花园 🌱 - 基于 GitHub Pages 搭建的博客与文档。欢迎分享想法!"
10+
[zh-cn.menu]
11+
[[zh-cn.menu.main]]
12+
identifier = "home"
13+
name = "主页"
14+
url = "/"
15+
weight = 1
16+
[zh-cn.menu.main.params]
17+
icon = "home"
18+
[[zh-cn.menu.main]]
19+
identifier = "archives"
20+
name = "所有博客"
21+
url = "/archives/"
22+
weight = 2
23+
[zh-cn.menu.main.params]
24+
icon = "archives"
25+
[[zh-cn.menu.main]]
26+
identifier = "search"
27+
name = "搜索"
28+
url = "/search/"
29+
weight = 3
30+
[zh-cn.menu.main.params]
31+
icon = "search"
32+
[[zh-cn.menu.main]]
33+
identifier = "links"
34+
name = "链接"
35+
url = "/links/"
36+
weight = 4
37+
[zh-cn.menu.main.params]
38+
icon = "link"
1039

1140
[en]
1241
languageName = "English"
@@ -16,3 +45,32 @@ contentDir = "content/en"
1645
weight = 2
1746
[en.params.sidebar]
1847
subtitle = "My digital garden 🌱 - A blog and docs built with GitHub Pages. Thoughts welcome!"
48+
[en.menu]
49+
[[en.menu.main]]
50+
identifier = "home"
51+
name = "Home"
52+
url = "/"
53+
weight = 1
54+
[en.menu.main.params]
55+
icon = "home"
56+
[[en.menu.main]]
57+
identifier = "archives"
58+
name = "Archives"
59+
url = "/archives/"
60+
weight = 2
61+
[en.menu.main.params]
62+
icon = "archives"
63+
[[en.menu.main]]
64+
identifier = "search"
65+
name = "Search"
66+
url = "/search/"
67+
weight = 3
68+
[en.menu.main.params]
69+
icon = "search"
70+
[[en.menu.main]]
71+
identifier = "links"
72+
name = "Links"
73+
url = "/links/"
74+
weight = 4
75+
[en.menu.main.params]
76+
icon = "link"

config/_default/menu.toml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1-
# Configure main menu and social menu
2-
#[[main]]
3-
#identifier = "home"
4-
#name = "Home"
5-
#url = "/"
6-
#[main.params]
7-
#icon = "home"
8-
#newtab = true
9-
101
[[social]]
112
identifier = "github"
123
name = "GitHub"
134
url = "https://github.com/CodeGlimpse"
14-
155
[social.params]
166
icon = "brand-github"
177

188
[[social]]
199
identifier = "email"
2010
name = "Email"
2111
url = "mailto:libochen@codeglimpse.top"
22-
2312
[social.params]
24-
icon = "mail"
13+
icon = "mail"

content/en/_index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
---
2-
menu:
3-
main:
4-
name: Home
5-
weight: 1
6-
params:
7-
icon: home
82
---

content/en/page/archives/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,4 @@ title: "Archives"
33
date: 2022-03-06
44
layout: "archives"
55
slug: "archives"
6-
menu:
7-
main:
8-
weight: 2
9-
params:
10-
icon: archives
116
---

content/en/page/links/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ links:
99
description: Email is the most widely used communication tool.
1010
website: mailto:libochen@codeglimpse.top
1111
image: mail.png
12-
menu:
13-
main:
14-
weight: 4
15-
params:
16-
icon: link
1712

1813
comments: false
1914
---

content/en/page/search/index.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,4 @@ layout: "search"
55
outputs:
66
- html
77
- json
8-
menu:
9-
main:
10-
weight: 3
11-
params:
12-
icon: search
138
---
-54.7 KB
Binary file not shown.

content/en/post/hello-world/index.md

Lines changed: 0 additions & 20 deletions
This file was deleted.
-14.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)