1bd68ca680
Build and Deploy Blog / build (push) Successful in 21s
- README.md 顶部加'简体中文 | English'切换 header - 半角逗号/冒号/括号统一改回中文全角(原文里被替成半角是误操作) - 新增 README.en.md:精简版,只留 hugo 起步 + 部署链路,适合外部读者 CI 触发提示:.gitea/workflows/build.yml paths-ignore 只列了 README.md, README.en.md 不在内,本次 push 会触发一次 build+deploy。改 yml 再加是 另一笔的事,本 commit 不动。
46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
# Zhengchen's Notebook
|
|
|
|
[简体中文](README.md) | English
|
|
|
|
Personal blog source, built on [Hugo](https://gohugo.io/) + [hugo-theme-stack](https://github.com/CaiJimmy/hugo-theme-stack).
|
|
|
|
Live at <https://blog.zhengchentao.win/>.
|
|
|
|
## Local development
|
|
|
|
```bash
|
|
# First-time clone: pull submodules
|
|
git clone --recurse-submodules <repo>
|
|
# Or, if already cloned:
|
|
git submodule update --init --recursive
|
|
|
|
# Local preview (includes drafts)
|
|
hugo server -D
|
|
|
|
# Production build
|
|
hugo --gc --minify
|
|
```
|
|
|
|
Requires Hugo Extended ≥ 0.161.1.
|
|
|
|
## New post
|
|
|
|
```bash
|
|
hugo new posts/2026-05-06-my-post.md
|
|
```
|
|
|
|
The date in the filename is only for local sorting — the actual publish time
|
|
comes from the `date` field in front matter.
|
|
|
|
## Deployment
|
|
|
|
Push-to-deploy via Gitea Actions: every push to `main` triggers a build, then
|
|
`rsync` ships `public/` to a directory bind-mounted into a long-running nginx
|
|
container on the NAS. Filesystem-level sync, no restart needed. Compose file
|
|
for the nginx container lives at [deploy/docker-compose.yml](deploy/docker-compose.yml).
|
|
|
|
## License
|
|
|
|
* Post content: [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
|
|
* Theme: see `themes/stack/` for its own license
|