go install github.com/zbysir/hollow@latest
或者直接使用 Docker (更推荐): https://hub.docker.com/r/bysir/hollow
这是一个可选步骤,用于快速查看一个主题的样子
docker run -p 9400:9400 bysir/hollow:master server -t https://github.com/zbysir/hollow-theme/tree/master/hollow
book
,然后进入 book
目录contents
文件用于存储内容contents/hello.md
, 内容如下:---
title: "Hello Hollow"
date: 2022-03-22
---
# Hello Hollow
write something here
./
└── contents/
└── hello.md
docker run -v ${PWD}:/source -p 9400:9400 bysir/hollow:master server -t https://github.com/zbysir/hollow-theme/tree/master/hollow
http://localhost:9400
下面的命令将会构建文件到 .dist
目录下
docker run -v ${PWD}:/source bysir/hollow:master build -o /source/.dist -t https://github.com/zbysir/hollow-theme/tree/master/hollow
./
├── .dist/
└── contents/
└── hello.md
随后将 .dist
中的所有文件部署到 Github page 上就完成了