Skip to content

Commit 61d429b

Browse files
committed
feat: 🎸 add new page
1 parent c6079e6 commit 61d429b

20 files changed

Lines changed: 933 additions & 9 deletions

File tree

content/about.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
+++
2+
title = "About me"
3+
date = 2024-01-14T10:00:00+01:00
4+
draft = false
5+
+++
6+
7+
这是我的个人介绍页面。
8+
9+
这个页面的 URL 将是:`/about/`

content/portfolio.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
+++
2+
title = "Portfolio"
3+
date = 2024-01-14T10:00:00+01:00
4+
draft = false
5+
+++
6+
7+
## 联系方式
8+
9+
如果您对我的作品感兴趣,欢迎通过以下方式联系我:
10+
11+
- 邮箱:your-email@example.com
12+
- GitHub:[github.com/yourusername](https://github.com/yourusername)
13+
- LinkedIn:[linkedin.com/in/yourprofile](https://linkedin.com/in/yourprofile)

exec.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Hugo 常用命令
2+
3+
# 1. 启动开发服务器
4+
hugo server # 启动本地服务器(默认端口1313)
5+
hugo server -p 8080 # 指定端口启动
6+
hugo server -D # 包含草稿文章
7+
hugo server --bind 0.0.0.0 # 允许外部访问
8+
9+
# 2. 创建内容
10+
hugo new posts/文章标题.md # 创建新文章
11+
hugo new about.md # 创建新页面
12+
hugo new --kind default page.md # 使用模板创建页面
13+
14+
# 3. 构建网站
15+
hugo # 构建静态网站到 public/ 目录
16+
hugo -D # 构建包含草稿
17+
hugo --minify # 构建并压缩文件
18+
19+
# 4. 内容管理
20+
hugo new posts/$(date +%Y-%m-%d)-文章标题.md # 创建带日期的文章
21+
22+
# 5. 部署相关
23+
hugo --cleanDestinationDir # 清理目标目录后构建
24+
hugo --gc # 运行垃圾回收
25+
26+
# 6. 其他有用命令
27+
hugo version # 查看 Hugo 版本
28+
hugo list drafts # 列出所有草稿
29+
hugo list future # 列出未来发布的文章
30+
hugo list expired # 列出过期的文章
31+
32+
# 7. 快速启动开发环境
33+
hugo server -D --bind 0.0.0.0 --port 1313

hugo.toml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
baseURL = 'https://example.org/'
22
languageCode = 'en-us'
33
title = 'GoCo Blog'
4-
theme = 'paper'
4+
theme = 'paper'
5+
6+
[menu]
7+
[[menu.main]]
8+
name = "Home"
9+
url = "/"
10+
weight = 1
11+
12+
[[menu.main]]
13+
name = "Portfolio"
14+
url = "/portfolio/"
15+
weight = 2
16+
17+
[[menu.main]]
18+
name = "About"
19+
url = "/about/"
20+
weight = 3

public/404.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,21 @@
122122

123123
<div
124124
class="nav-wrapper fixed inset-x-0 top-full z-40 flex h-full flex-col justify-center bg-(--bg) pb-16 duration-200 select-none lg:static lg:h-auto lg:flex-row lg:bg-transparent! lg:pb-0 lg:transition-none"
125-
>
125+
><nav
126+
class="lg:ml-12 lg:flex lg:flex-row lg:items-center lg:space-x-10 rtl:space-x-reverse"
127+
><a
128+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
129+
href="/"
130+
>Home</a
131+
><a
132+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
133+
href="/portfolio/"
134+
>Portfolio</a
135+
><a
136+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
137+
href="/about/"
138+
>About</a
139+
></nav>
126140
</div>
127141
</header>
128142
<main

public/about/index.html

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<!doctype html>
2+
3+
4+
5+
6+
7+
8+
9+
<html
10+
class="not-ready lg:text-base"
11+
style="--bg:#faf8f1"
12+
lang="en-us"
13+
dir="ltr"
14+
><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
15+
<meta charset="utf-8" />
16+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
17+
<meta
18+
name="viewport"
19+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
20+
/>
21+
22+
23+
<title>About me - GoCo Blog</title>
24+
25+
26+
<meta name="theme-color" />
27+
28+
<meta name="description" content="这是我的个人介绍页面。
29+
这个页面的 URL 将是:/about/" />
30+
<meta name="author" content="GoCo Blog" /><link rel="preload stylesheet" as="style" href="http://localhost:1313/main.min.css" />
31+
32+
33+
<link rel="preload" as="image" href="http://localhost:1313/theme.png" />
34+
35+
36+
37+
38+
39+
<script
40+
defer
41+
src="http://localhost:1313/highlight.min.js"
42+
onload="hljs.initHighlightingOnLoad();"
43+
></script>
44+
45+
46+
<link
47+
rel="icon"
48+
href="http://localhost:1313/favicon.ico"
49+
/>
50+
<link
51+
rel="apple-touch-icon"
52+
href="http://localhost:1313/apple-touch-icon.png"
53+
/>
54+
55+
<meta name="generator" content="Hugo 0.148.2">
56+
</head>
57+
<body
58+
class="bg-(--bg) text-black antialiased duration-200 ease-out [-webkit-tap-highlight-color:transparent] dark:text-white"
59+
><header
60+
class="mx-auto flex h-[4.5rem] max-w-(--w) px-8 whitespace-nowrap lg:justify-center"
61+
>
62+
<div class="relative z-50 flex items-center ltr:mr-auto rtl:ml-auto">
63+
<a
64+
class="-translate-y-[1px] text-2xl font-medium"
65+
href="http://localhost:1313/"
66+
>GoCo Blog</a
67+
>
68+
<div
69+
class="btn-dark text-[0px] ltr:ml-4 rtl:mr-4 h-6 w-6 shrink-0 cursor-pointer [background:url(./theme.png)_left_center/_auto_theme('spacing.6')_no-repeat] [transition:_background-position_0.4s_steps(5)] dark:[background-position:right]"
70+
role="button"
71+
aria-label="Dark"
72+
></div>
73+
</div>
74+
75+
<div
76+
class="btn-menu relative z-50 flex h-[4.5rem] w-[5rem] shrink-0 cursor-pointer flex-col items-center justify-center gap-2.5 lg:hidden ltr:-mr-8 rtl:-ml-8"
77+
role="button"
78+
aria-label="Menu"
79+
></div>
80+
81+
<script>
82+
83+
const htmlClass = document.documentElement.classList;
84+
setTimeout(() => {
85+
htmlClass.remove('not-ready');
86+
}, 10);
87+
88+
89+
const btnMenu = document.querySelector('.btn-menu');
90+
btnMenu.addEventListener('click', () => {
91+
htmlClass.toggle('open');
92+
});
93+
94+
95+
const metaTheme = document.querySelector('meta[name="theme-color"]');
96+
const lightBg = '#faf8f1'.replace(/"/g, '');
97+
const setDark = (isDark) => {
98+
metaTheme.setAttribute('content', isDark ? '#000' : lightBg);
99+
htmlClass[isDark ? 'add' : 'remove']('dark');
100+
localStorage.setItem('dark', isDark);
101+
};
102+
103+
104+
const darkScheme = window.matchMedia('(prefers-color-scheme: dark)');
105+
if (htmlClass.contains('dark')) {
106+
setDark(true);
107+
} else {
108+
const darkVal = localStorage.getItem('dark');
109+
setDark(darkVal ? darkVal === 'true' : darkScheme.matches);
110+
}
111+
112+
113+
darkScheme.addEventListener('change', (event) => {
114+
setDark(event.matches);
115+
});
116+
117+
118+
const btnDark = document.querySelector('.btn-dark');
119+
btnDark.addEventListener('click', () => {
120+
setDark(localStorage.getItem('dark') !== 'true');
121+
});
122+
</script>
123+
124+
<div
125+
class="nav-wrapper fixed inset-x-0 top-full z-40 flex h-full flex-col justify-center bg-(--bg) pb-16 duration-200 select-none lg:static lg:h-auto lg:flex-row lg:bg-transparent! lg:pb-0 lg:transition-none"
126+
><nav
127+
class="lg:ml-12 lg:flex lg:flex-row lg:items-center lg:space-x-10 rtl:space-x-reverse"
128+
><a
129+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
130+
href="/"
131+
>Home</a
132+
><a
133+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
134+
href="/portfolio/"
135+
>Portfolio</a
136+
><a
137+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
138+
href="/about/"
139+
>About</a
140+
></nav>
141+
</div>
142+
</header>
143+
<main
144+
class="prose prose-neutral dark:prose-invert relative mx-auto min-h-[calc(100vh-9rem)] max-w-(--w) px-8 pt-14 pb-16"
145+
><article>
146+
<header class="mb-14">
147+
<h1 class="my-0! pb-2.5">About me</h1></header>
148+
149+
<section><p>这是我的个人介绍页面。</p>
150+
<p>这个页面的 URL 将是:<code>/about/</code></p>
151+
</section>
152+
153+
</article></main><footer
154+
class="mx-auto flex h-[4.5rem] max-w-(--w) items-center px-8 text-xs tracking-wider uppercase opacity-60"
155+
>
156+
<div class="mr-auto">&copy;2025
157+
<a class="link" href="http://localhost:1313/">GoCo Blog</a></div>
158+
<a class="link mx-6" href="https://gohugo.io/" rel="noopener" target="_blank"
159+
>powered by hugo️️</a
160+
>
161+
<a
162+
class="link"
163+
href="https://github.com/nanxiaobei/hugo-paper"
164+
rel="noopener"
165+
target="_blank"
166+
>hugo-paper</a
167+
>
168+
</footer>
169+
</body>
170+
</html>

public/categories/index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,21 @@
122122

123123
<div
124124
class="nav-wrapper fixed inset-x-0 top-full z-40 flex h-full flex-col justify-center bg-(--bg) pb-16 duration-200 select-none lg:static lg:h-auto lg:flex-row lg:bg-transparent! lg:pb-0 lg:transition-none"
125-
>
125+
><nav
126+
class="lg:ml-12 lg:flex lg:flex-row lg:items-center lg:space-x-10 rtl:space-x-reverse"
127+
><a
128+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
129+
href="/"
130+
>Home</a
131+
><a
132+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
133+
href="/portfolio/"
134+
>Portfolio</a
135+
><a
136+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
137+
href="/about/"
138+
>About</a
139+
></nav>
126140
</div>
127141
</header>
128142
<main

public/index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,21 @@
122122

123123
<div
124124
class="nav-wrapper fixed inset-x-0 top-full z-40 flex h-full flex-col justify-center bg-(--bg) pb-16 duration-200 select-none lg:static lg:h-auto lg:flex-row lg:bg-transparent! lg:pb-0 lg:transition-none"
125-
>
125+
><nav
126+
class="lg:ml-12 lg:flex lg:flex-row lg:items-center lg:space-x-10 rtl:space-x-reverse"
127+
><a
128+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
129+
href="/"
130+
>Home</a
131+
><a
132+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
133+
href="/portfolio/"
134+
>Portfolio</a
135+
><a
136+
class="block text-center text-xl leading-[5rem] lg:text-base lg:font-normal"
137+
href="/about/"
138+
>About</a
139+
></nav>
126140
</div>
127141
</header>
128142
<main

public/index.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@
2222
<guid>http://localhost:1313/posts/1/</guid>
2323
<description>&lt;p&gt;What is ChatGPT?&#xA;以聊天方式和LLM进行对话的应用&lt;/p&gt;&#xA;&lt;p&gt;What is LLM?&#xA;黑盒,根据数据进行训练,实现根据输入来预测输出&lt;/p&gt;&#xA;&lt;p&gt;用大模型做计算,为什么会存在计算错误的情况?例如9.11-9.9,大模型训练只是文本数据,&lt;/p&gt;</description>
2424
</item>
25+
<item>
26+
<title>About me</title>
27+
<link>http://localhost:1313/about/</link>
28+
<pubDate>Sun, 14 Jan 2024 10:00:00 +0100</pubDate>
29+
<guid>http://localhost:1313/about/</guid>
30+
<description>&lt;p&gt;这是我的个人介绍页面。&lt;/p&gt;&#xA;&lt;p&gt;这个页面的 URL 将是:&lt;code&gt;/about/&lt;/code&gt;&lt;/p&gt;</description>
31+
</item>
32+
<item>
33+
<title>Portfolio</title>
34+
<link>http://localhost:1313/portfolio/</link>
35+
<pubDate>Sun, 14 Jan 2024 10:00:00 +0100</pubDate>
36+
<guid>http://localhost:1313/portfolio/</guid>
37+
<description>&lt;h2 id=&#34;联系方式&#34;&gt;联系方式&lt;/h2&gt;&#xA;&lt;p&gt;如果您对我的作品感兴趣,欢迎通过以下方式联系我:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;邮箱:your-email@example.com&lt;/li&gt;&#xA;&lt;li&gt;GitHub:&lt;a href=&#34;https://github.com/yourusername&#34;&gt;github.com/yourusername&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;LinkedIn:&lt;a href=&#34;https://linkedin.com/in/yourprofile&#34;&gt;linkedin.com/in/yourprofile&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
38+
</item>
2539
<item>
2640
<title>My First Post</title>
2741
<link>http://localhost:1313/posts/my-first-post/</link>

0 commit comments

Comments
 (0)