第一篇文章
本文全部由ai自动生成
这是第一篇文章。因为它上面写了 slug = "hello",所以网址是 /hello/。
怎么写新文章
1hugo new blog/我的新文章.md
会生成一个带 front matter 的文件,填好 title 就能写了。文件名会变成 URL 的 slug,所以建议用英文或拼音,比如 my-new-post.md → /my-new-post/。
front matter 说明
1+++
2title = "标题" # 必填
3date = "2026-10-21" # 不写会用文件创建时间
4tags = ["标签"] # 可选,会在文末显示成 #标签
5description = "摘要" # 可选,用于搜索引擎和分享卡片
6+++
支持的写法
粗体、斜体、行内代码、链接
。
1def hello():
2 print("代码块带高亮和行号")
引用块。
- 列表
- 有序/无序都行
图片放进 static/ 或和文章放一起,然后  引用。
写完执行:
1hugo server -D # 本地预览 localhost:1313
满意了再 git push,Cloudflare Pages 会自动构建上线。