capa-cloud / capa.io

https://capa-cloud.github.io/capa.io/
Apache License 2.0
3 stars 4 forks source link

Blog搭建步骤 #3

Open kevinten10 opened 3 years ago

kevinten10 commented 3 years ago

选型

步骤

1. 安装hugo-extended

2. 使用docsy-example作为模板

在github创建项目时,使用模板

3. clone到本地

clone自己创建的项目

4. 安装submodule依赖

git submodule update --init --recursive

5. 安装npm依赖

npm install -D --save autoprefixer
npm install -D --save postcss-cli

6. 本地渲染校验

hugo server

7. 修改配置文件

修改config.toml文件

// [参考文档3] 使用/docs渲染目录
publishDir = "docs"
// [参考文档3] 指向github pages提供的url
baseURL = "https://haiteng-wang.github.io/"

8. 生成博客页面

hugo

9. 提交代码到github

主要是:

10. 访问页面

访问github pages提供的url

参考文档

  1. https://skyao.io/learning-hugo/docs/theme/docsy/setup.html
  2. https://github.com/google/docsy-example
  3. https://www.jianshu.com/p/475110a1c811