commit e9b2dca47b1d5ab0314850bf9405b00d05fe9df0 Author: Ubuntu Date: Mon Apr 13 13:51:02 2026 +0800 init: hugo site with mytheme diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/content/posts/hello-world.md b/content/posts/hello-world.md new file mode 100644 index 0000000..eafe886 --- /dev/null +++ b/content/posts/hello-world.md @@ -0,0 +1,19 @@ +--- +title: "Hello World" +date: 2026-04-13 +categories: ["随笔"] +tags: ["测试"] +description: "茶凉小记的第一篇文章" +--- + +欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。 + +## 关于这个博客 + +这里记录技术、生活与想法。 + +```javascript +console.log("Hello, Hugo!"); +``` + +> 简单、纯粹、持久。 diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..e3bb2a7 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,15 @@ +baseURL = "https://ziven1220.ac.cn/" +languageCode = "zh-CN" +title = "茶凉小记" +theme = "mytheme" + +[params] + subtitle = "记录技术、生活与想法" + beian = "浙ICP备2023002438号" + +[taxonomies] + tag = "tags" + category = "categories" + +[build] + writeStats = true diff --git a/hugo_stats.json b/hugo_stats.json new file mode 100644 index 0000000..384e7a4 --- /dev/null +++ b/hugo_stats.json @@ -0,0 +1,47 @@ +{ + "htmlElements": { + "tags": [ + "a", + "article", + "blockquote", + "body", + "div", + "footer", + "h1", + "h2", + "head", + "header", + "html", + "link", + "main", + "meta", + "nav", + "p", + "pre", + "title" + ], + "classes": [ + "footer-inner", + "header-inner", + "hero-sub", + "highlight", + "home-hero", + "list-title", + "main-content", + "post-card", + "post-content", + "post-list", + "post-meta", + "post-single", + "post-summary", + "post-title", + "site-footer", + "site-header", + "site-nav", + "site-title" + ], + "ids": [ + "关于这个博客" + ] + } +} diff --git a/public/categories/index.html b/public/categories/index.html new file mode 100644 index 0000000..9744835 --- /dev/null +++ b/public/categories/index.html @@ -0,0 +1,5 @@ +Categories - 茶凉小记 +

Categories

随笔

\ No newline at end of file diff --git a/public/categories/index.xml b/public/categories/index.xml new file mode 100644 index 0000000..9177daf --- /dev/null +++ b/public/categories/index.xml @@ -0,0 +1 @@ +Categories on 茶凉小记https://ziven1220.ac.cn/categories/Recent content in Categories on 茶凉小记Hugo -- gohugo.iozh-CNMon, 13 Apr 2026 00:00:00 +0000随笔https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/Mon, 13 Apr 2026 00:00:00 +0000https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/ \ No newline at end of file diff --git a/public/categories/page/1/index.html b/public/categories/page/1/index.html new file mode 100644 index 0000000..1bb1fd5 --- /dev/null +++ b/public/categories/page/1/index.html @@ -0,0 +1,2 @@ +https://ziven1220.ac.cn/categories/ + \ No newline at end of file diff --git a/public/categories/随笔/index.html b/public/categories/随笔/index.html new file mode 100644 index 0000000..df5af6a --- /dev/null +++ b/public/categories/随笔/index.html @@ -0,0 +1,5 @@ +随笔 - 茶凉小记 +

随笔

Hello World

茶凉小记的第一篇文章

\ No newline at end of file diff --git a/public/categories/随笔/index.xml b/public/categories/随笔/index.xml new file mode 100644 index 0000000..1ed65b8 --- /dev/null +++ b/public/categories/随笔/index.xml @@ -0,0 +1,3 @@ +随笔 on 茶凉小记https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/Recent content in 随笔 on 茶凉小记Hugo -- gohugo.iozh-CNMon, 13 Apr 2026 00:00:00 +0000Hello Worldhttps://ziven1220.ac.cn/posts/hello-world/Mon, 13 Apr 2026 00:00:00 +0000https://ziven1220.ac.cn/posts/hello-world/欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。 +关于这个博客 这里记录技术、生活与想法。 +console.log("Hello, Hugo!"); 简单、纯粹、持久。 \ No newline at end of file diff --git a/public/categories/随笔/page/1/index.html b/public/categories/随笔/page/1/index.html new file mode 100644 index 0000000..fe237dc --- /dev/null +++ b/public/categories/随笔/page/1/index.html @@ -0,0 +1,2 @@ +https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/ + \ No newline at end of file diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..77e710c --- /dev/null +++ b/public/index.html @@ -0,0 +1,5 @@ +茶凉小记 +

茶凉小记

记录技术、生活与想法

Hello World

茶凉小记的第一篇文章

\ No newline at end of file diff --git a/public/index.xml b/public/index.xml new file mode 100644 index 0000000..a01553c --- /dev/null +++ b/public/index.xml @@ -0,0 +1,3 @@ +茶凉小记https://ziven1220.ac.cn/Recent content on 茶凉小记Hugo -- gohugo.iozh-CNMon, 13 Apr 2026 00:00:00 +0000Hello Worldhttps://ziven1220.ac.cn/posts/hello-world/Mon, 13 Apr 2026 00:00:00 +0000https://ziven1220.ac.cn/posts/hello-world/欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。 +关于这个博客 这里记录技术、生活与想法。 +console.log("Hello, Hugo!"); 简单、纯粹、持久。 \ No newline at end of file diff --git a/public/posts/hello-world/index.html b/public/posts/hello-world/index.html new file mode 100644 index 0000000..587e6dc --- /dev/null +++ b/public/posts/hello-world/index.html @@ -0,0 +1,6 @@ +Hello World - 茶凉小记 +

Hello World

欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。

关于这个博客

这里记录技术、生活与想法。

console.log("Hello, Hugo!");
+

简单、纯粹、持久。

\ No newline at end of file diff --git a/public/posts/index.html b/public/posts/index.html new file mode 100644 index 0000000..8751365 --- /dev/null +++ b/public/posts/index.html @@ -0,0 +1,5 @@ +Posts - 茶凉小记 +

Posts

Hello World

茶凉小记的第一篇文章

\ No newline at end of file diff --git a/public/posts/index.xml b/public/posts/index.xml new file mode 100644 index 0000000..6221036 --- /dev/null +++ b/public/posts/index.xml @@ -0,0 +1,3 @@ +Posts on 茶凉小记https://ziven1220.ac.cn/posts/Recent content in Posts on 茶凉小记Hugo -- gohugo.iozh-CNMon, 13 Apr 2026 00:00:00 +0000Hello Worldhttps://ziven1220.ac.cn/posts/hello-world/Mon, 13 Apr 2026 00:00:00 +0000https://ziven1220.ac.cn/posts/hello-world/欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。 +关于这个博客 这里记录技术、生活与想法。 +console.log("Hello, Hugo!"); 简单、纯粹、持久。 \ No newline at end of file diff --git a/public/posts/page/1/index.html b/public/posts/page/1/index.html new file mode 100644 index 0000000..dc8f8f0 --- /dev/null +++ b/public/posts/page/1/index.html @@ -0,0 +1,2 @@ +https://ziven1220.ac.cn/posts/ + \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..d82cc81 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1 @@ +https://ziven1220.ac.cn/categories/2026-04-13T00:00:00+00:00https://ziven1220.ac.cn/posts/hello-world/2026-04-13T00:00:00+00:00https://ziven1220.ac.cn/posts/2026-04-13T00:00:00+00:00https://ziven1220.ac.cn/tags/2026-04-13T00:00:00+00:00https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/2026-04-13T00:00:00+00:00https://ziven1220.ac.cn/2026-04-13T00:00:00+00:00https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/2026-04-13T00:00:00+00:00 \ No newline at end of file diff --git a/public/tags/index.html b/public/tags/index.html new file mode 100644 index 0000000..4de677f --- /dev/null +++ b/public/tags/index.html @@ -0,0 +1,5 @@ +Tags - 茶凉小记 +

Tags

测试

\ No newline at end of file diff --git a/public/tags/index.xml b/public/tags/index.xml new file mode 100644 index 0000000..68f079b --- /dev/null +++ b/public/tags/index.xml @@ -0,0 +1 @@ +Tags on 茶凉小记https://ziven1220.ac.cn/tags/Recent content in Tags on 茶凉小记Hugo -- gohugo.iozh-CNMon, 13 Apr 2026 00:00:00 +0000测试https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/Mon, 13 Apr 2026 00:00:00 +0000https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/ \ No newline at end of file diff --git a/public/tags/page/1/index.html b/public/tags/page/1/index.html new file mode 100644 index 0000000..df9a90d --- /dev/null +++ b/public/tags/page/1/index.html @@ -0,0 +1,2 @@ +https://ziven1220.ac.cn/tags/ + \ No newline at end of file diff --git a/public/tags/测试/index.html b/public/tags/测试/index.html new file mode 100644 index 0000000..76bc5b5 --- /dev/null +++ b/public/tags/测试/index.html @@ -0,0 +1,5 @@ +测试 - 茶凉小记 +

测试

Hello World

茶凉小记的第一篇文章

\ No newline at end of file diff --git a/public/tags/测试/index.xml b/public/tags/测试/index.xml new file mode 100644 index 0000000..042279c --- /dev/null +++ b/public/tags/测试/index.xml @@ -0,0 +1,3 @@ +测试 on 茶凉小记https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/Recent content in 测试 on 茶凉小记Hugo -- gohugo.iozh-CNMon, 13 Apr 2026 00:00:00 +0000Hello Worldhttps://ziven1220.ac.cn/posts/hello-world/Mon, 13 Apr 2026 00:00:00 +0000https://ziven1220.ac.cn/posts/hello-world/欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。 +关于这个博客 这里记录技术、生活与想法。 +console.log("Hello, Hugo!"); 简单、纯粹、持久。 \ No newline at end of file diff --git a/public/tags/测试/page/1/index.html b/public/tags/测试/page/1/index.html new file mode 100644 index 0000000..a841a48 --- /dev/null +++ b/public/tags/测试/page/1/index.html @@ -0,0 +1,2 @@ +https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/ + \ No newline at end of file diff --git a/themes/mytheme/assets/css/main.css b/themes/mytheme/assets/css/main.css new file mode 100644 index 0000000..f334efb --- /dev/null +++ b/themes/mytheme/assets/css/main.css @@ -0,0 +1,60 @@ +/** 茶凉小记 - 赛博深色风格 */ +:root { + --bg: #0a0a0f; + --surface: #12121a; + --border: #1e1e2e; + --text: #e0e0e0; + --text-muted: #888; + --accent: #00d4ff; + --accent-dim: #00d4ff33; + --code-bg: #16161f; + --font: 'JetBrains Mono', monospace; +} +* { box-sizing: border-box; margin: 0; padding: 0; } +html { scroll-behavior: smooth; } +body { + background: var(--bg); + color: var(--text); + font-family: var(--font); + font-size: 15px; + line-height: 1.7; + min-height: 100vh; + display: flex; + flex-direction: column; +} +a { color: var(--accent); text-decoration: none; } +a:hover { text-decoration: underline; } + +.site-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); } +.header-inner { max-width: 800px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; } +.site-title { font-size: 1.2rem; font-weight: 700; color: var(--accent) !important; letter-spacing: 0.05em; } +.site-nav a { color: var(--text-muted); margin-left: 2rem; font-size: 0.85rem; } +.site-nav a:hover { color: var(--accent); text-decoration: none; } + +.main-content { flex: 1; max-width: 800px; margin: 0 auto; padding: 4rem 2rem; width: 100%; } +.home-hero { text-align: center; padding: 4rem 0 3rem; } +.home-hero h1 { font-size: 2.5rem; font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; } +.hero-sub { color: var(--text-muted); font-size: 0.9rem; } +.post-list { margin-top: 2rem; } +.post-card { padding: 1.5rem 0; border-bottom: 1px solid var(--border); } +.post-card h2 { font-size: 1.1rem; margin-bottom: 0.3rem; } +.post-card h2 a { color: var(--text); } +.post-card h2 a:hover { color: var(--accent); text-decoration: none; } +.post-meta { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.5rem; } +.post-summary { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; } +.post-single { max-width: 680px; margin: 0 auto; } +.post-title { font-size: 1.8rem; color: var(--text); margin-bottom: 0.5rem; } +.post-single .post-meta { margin-bottom: 2rem; } +.post-content { line-height: 1.8; } +.post-content h2, .post-content h3 { color: var(--text); margin: 2rem 0 1rem; } +.post-content p { margin-bottom: 1.2rem; } +.post-content code { background: var(--code-bg); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.88em; color: var(--accent); } +.post-content pre { background: var(--code-bg); padding: 1.2rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1.2rem; } +.post-content pre code { background: none; padding: 0; color: var(--text); } +.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text-muted); margin: 1.5rem 0; } +.post-content img { max-width: 100%; border-radius: 6px; margin: 1.5rem 0; } +.site-footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.8rem; } +.footer-inner p { margin: 0.3rem 0; } +.footer-inner a { color: var(--text-muted); } +.footer-inner a:hover { color: var(--accent); } +@media (max-width: 600px) { .header-inner { flex-direction: column; gap: 1rem; } .site-nav a { margin: 0 0.8rem; } .home-hero h1 { font-size: 1.8rem; } .post-title { font-size: 1.4rem; } } \ No newline at end of file diff --git a/themes/mytheme/layouts/_default/baseof.html b/themes/mytheme/layouts/_default/baseof.html new file mode 100644 index 0000000..9c31995 --- /dev/null +++ b/themes/mytheme/layouts/_default/baseof.html @@ -0,0 +1,31 @@ + + + + + + {{ block "title" . }}{{ .Site.Title }}{{ end }} + + + + + + +
{{ block "main" . }}{{ end }}
+ + + \ No newline at end of file diff --git a/themes/mytheme/layouts/_default/index.html b/themes/mytheme/layouts/_default/index.html new file mode 100644 index 0000000..c4ae071 --- /dev/null +++ b/themes/mytheme/layouts/_default/index.html @@ -0,0 +1,15 @@ +{{ define "main" }} +
+

{{ .Site.Title }}

+

{{ .Site.Params.subtitle }}

+
+
+ {{ range first 10 (where .Site.RegularPages "Type" "posts") }} +
+

{{ .Title }}

+ +

{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}

+
+ {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/themes/mytheme/layouts/_default/list.html b/themes/mytheme/layouts/_default/list.html new file mode 100644 index 0000000..2256774 --- /dev/null +++ b/themes/mytheme/layouts/_default/list.html @@ -0,0 +1,13 @@ +{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ {{ range .Paginator.Pages }} +
+

{{ .Title }}

+ +

{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}

+
+ {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/themes/mytheme/layouts/_default/single.html b/themes/mytheme/layouts/_default/single.html new file mode 100644 index 0000000..0a9c3ec --- /dev/null +++ b/themes/mytheme/layouts/_default/single.html @@ -0,0 +1,8 @@ +{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }} +{{ define "main" }} +
+

{{ .Title }}

+ +
{{ .Content }}
+
+{{ end }} \ No newline at end of file diff --git a/themes/mytheme/layouts/index.html b/themes/mytheme/layouts/index.html new file mode 100644 index 0000000..c4ae071 --- /dev/null +++ b/themes/mytheme/layouts/index.html @@ -0,0 +1,15 @@ +{{ define "main" }} +
+

{{ .Site.Title }}

+

{{ .Site.Params.subtitle }}

+
+
+ {{ range first 10 (where .Site.RegularPages "Type" "posts") }} +
+

{{ .Title }}

+ +

{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}

+
+ {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/themes/mytheme/theme.toml b/themes/mytheme/theme.toml new file mode 100644 index 0000000..6f6d6b6 --- /dev/null +++ b/themes/mytheme/theme.toml @@ -0,0 +1,3 @@ +name = "mytheme" +license = "MIT" +min_version = "0.123.0"