Install Hexo and setting

Here are command for creating my hexo blog:

1
2
3
4
5
6
7
npm install -g hexo-cli
hexo -v # just check hexo's version
hexo init robincpc.github.io # initialize hexo blog's folder
cd robincpc.github.io
npm install
hexo server
vim _config.yml

Update config file

Some parts I changed in “_config.yml”

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Site
title: robincpc's note
subtitle: ''
description: 'robincpc"s personal blog'
keywords:
author: Robin Chen
language: en
timezone: 'Asia/Taipei'

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://robincpc.github.io/


# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: 'git'
repo: https://github.com/RobinCPC/robincpc.github.io.git
branch: main

Clean up

1
2
3
4
5
hexo generate --watch
hexo new first-post
vim source/_posts/first-post.md # edit your first post
rm source/_posts/hello-world.md # delete demo post
hexo clean

Create a repo on you github for your Hexo blog

1
2
npm install hexo-deployer-git --save
hexo deploy