Create a personal blog-hexo

Use hexo to quickly build a blog self-check form

Environment setup

node -v #View node version

npm -v #View the npm version

npm install -g cnpm --registry=http://registry.npm.taobao.org #Install Taobao's cnpm manager

cnpm -v #View cnpm version

cnpm install -g hexo-cli #Install hexo framework

hexo -v #View hexo version

mkdir blog #Create blog directory

cd blog #Enter the blog directory

Create a blog

sudo hexo init #Generate blog initialization blog

hexo s #Start local blog service

http://localhost:4000/ #Local access address

hexo n "My First Article" #Create a new article

#Return to blog directory

hexo clean #clean up

hexo g #generate

#GithubCreate a new warehouse YourGithubName.github.io

cnpm install --save hexo-deployer-git #Install the git deployment plugin in the blog directory

Configuration

# Deployment
	## Docs: https://hexo.io/docs/deployment.html
	deploy:
  		type: git //如果出错,可能需要用("git")
 		repo: https://github.com/https://suifengge.github.io/.git
  		branch: master

Deploy to github repository

hexo d #Deploy to Github warehouse

https://YourGithubName.github.io/ #Visit this address to view the blog

git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia #download yilia theme to local

#Modify the _config.yml file in the hexo root directory: theme: yilia

hexo c #Clean up

hexo g #generate

hexo d #Deploy to remote Github warehouse
Possible problems:
1. The page does not appear, resulting in failure to submit to the remote warehouse.
Solution: Find the reported error and find a solution.
Insert picture description here
https://suifengge.github.io/ #View blog

Reference:
[1] teach you how to build your own personal blog from 0 | video tutorial without pit version | hexo

Guess you like

Origin blog.csdn.net/zhanlong11/article/details/115293557