This is my blog site source code, where the source code is in the master branch and the generated static pages are in the gh-pages branch.
- Node.js (Base)
- Hexo (Build blog site)
- Markdown (Write blog)
- See more in
package.json
You'll need the
nodejs
development environment, as well as a proper installation ofnpm
orcnpm
with the latest version. Forcnpm
, please refer to CNPM
- Clone this repo to your PC.
git clone [email protected]:sunhao-java/blog.git
- Install hexo and hexo-cli globally.(npm/cnpm)
npm install hexo hexo-cli -g
- Install dependencies.
// root of blog repo
npm install
- Instructions for use
1. hexo serve
2. hexo generate
3. For more, please visit hexo's official website at https://hexo.io/zh-cn/
-
build
see more at
.github/workflows/deploy.yml
-
Configuration in gihub
-
Using custom domain names
- Create a file named
CNAME
in theblog/source
directory - The content is the domain name you will use
www.crazy-coder.cn
- Configure domain name resolution on your domain's provider's website
Record type: CNAME Host Records: www Recorded Value: sunhao-java.github.io
- sunhao-java.github.io
- sunhao-java: your github username
- github.io: fixed value
- Create a file named