Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

一条命令

1
2
hexo clean & hexo g & hexo s # 默认端口号:4000
hexo clean & hexo g & hexo server -p 5000 # 如果4000端口打不开,改用5000

简化命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#(1)安装 NodeJS:https://nodejs.org/en/ ,安装好后打开 git bash
node -v, npm -v # 测试

#(2)安装 hexo
npm install hexo-cli -g # hexo 全局安装
# 若失败,配置国内镜像:https://www.jianshu.com/p/2afac1bc0af8
* npm config set registry https://registry.npm.taobao.org
// 配置后可通过下面方式来验证是否成功
* npm config get registry
// 或npm info express
hexo -v # 测试

#(3)安装 hexo save
npm install hexo --save

#(4)更新博客提交
hexo c & hexo g # 清理并生成
hexo s -p 5000 # 本地服务
hexo d # 推送

# (5) Ubuntu 20.04 安装 hexo
- 参考:http://wbug.cn/2017/11/09/hexoerror/
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
sudo cnpm install hexo-cli -g
sudo cnpm install hexo --save
sudo cnpm install hexo-deployer-git # hexo d

学习教程

安装教程

优化教程

百度谷歌收录(自动推送 和 sitemap)

绑定自定义域名:

More info: Deployment

坚持原创技术分享,您的支持将鼓励我继续创作!
0%