本网站采用 Minimal Mistakes 主题,各自定义项目参见主题的文档。
添加新页面(Wiki / News)请分别在 pages/_wiki,pages/_news 中参考 _template.md。
设置文章作者请在 _data/authors.yml 中添加作者信息(参考已有内容),然后在页面中指定 author: key(只支持一个作者)。
-
安装 Ruby 开发环境:根据Ruby安装-菜鸟教程 安装 Ruby,运行
gem install bundler -
运行
bundle install --path=vendor/bundle以安装依赖的软件包 -
运行
bundle exec jekyll serve,此时即可在 http://localhost:4000/ 预览网站 -
编译整个网站的命令为
bundle exec jekyll build在命令行末尾添加
--profile可以查看编译性能分析(每个源文件耗时),添加--trace可以在出错时输出 stack trace正式部署时需要添加环境变量
JEKYLL_ENV=production,详情请见 GitHub Actions 的 workflow 配置
