快速开始

安装

使用 Homebrew

1brew install honmaple/tap/snow

从源码安装

1go install github.com/honmaple/snow@latest

手动编译

1git clone https://github.com/honmaple/snow --depth=1
2cd snow
3go mod tidy
4go build .

创建站点

1snow init [目录名]

示例:

1$ snow init myblog
2Welcome to snow 0.1.7.
3> Where do you want to create your new web site? [.] myblog
4> What will be the title of this web site? [snow]
5> Who will be the author of this web site? honmaple
6> What is your URL prefix? (no trailing slash) [http://example.com]
7> Do you want to create first page? [Y/n]

初始化后生成:

1myblog/
2├── config.yaml
3├── content/
4│   └── posts/
5│       └── hello-snow.md

预览站点

1cd myblog
2snow server --autoload

如果不想切换目录,也可以指定站点根目录:

1snow server --root-dir myblog --autoload

构建站点

1snow build

常见生产构建:

1snow build --mode publish --clean 

更多命令和参数见 命令行使用

下一步

©2026 · 红枫文档