hexo(10)摘要
hexo
refer-component
- hexo-cos
- git
- node
- cos
quick-start
- hexo-serer + hexo-cos
1.node
npm config set registry https://registry.npmmirror.com --global
2.install hexo
npm install -g hexo-cli
hexo -v
3.init blog
cd ~ && hexo init blog --no-clone
cd ~/blog && npm install hexo-deployer-cos --save
4.自动生成博客静态文件
hexo g
hexo genertate # 支持简写
5.启动博客
cd ~/blog/ && hexo s
hexo server
6.访问本地开发调试hexo-server
http://localhost:4000/
7.发布静态文件支持存储cos
_config.yml
deploy:
type: cos
secretId: yourSecretId
secretKey: yourSecretKey
bucket: yourBucket
region: yourRegion
8.重新生成静态文件并部署
hexo g -d
9.markdown模板文件
cd ~/blog && hexo new first
10.重新生成静态文件并部署
cd ~/blog && hexo g -d
11.支持缩写
hexo clean
hexo g
hexo s
hexo-themes
next
- https://github.com/next-theme/hexo-theme-next
- https://github.com/next-theme/awesome-next
- https://github.com/LouisBarranqueiro/hexo-algoliasearch
- https://theme-next.iissnan.com/
- https://github.com/next-theme/hexo-theme-next
- https://github.com/Jamling/hexo-generator-i18n
- https://github.com/sandoche/Darkmode.js
- https://github.com/next-theme/hexo-optimize
- https://theme-next.js.org/plugins/
- https://github.com/fluid-dev/hexo-theme-fluid
- https://github.com/blinkfox/hexo-theme-matery
hexo-deployer-git
1.install deploy plugin
一键发布至 github 仓库需要安装插件:hexo-deployer-git
npm install hexo-deployer-git --save
2.configure repo
建议配置成这种模式:
repo: [email protected]:username/username.github.io.git
or
# -------------------------------------------------------------------
# 一键发布至 github 仓库,需要安装插件:hexo-deployer-git
# Deployment
# npm install hexo-deployer-git --save
## Docs: https://hexo.io/docs/one-command-deployment
# -------------------------------------------------------------------
deploy:
type: git
#repo: https://github.com/cnwangk/cnwangk.github.io
repo: [email protected]:cnwangk/cnwangk.github.io.git
branch: gh-pages
#message: 升级 hexo 版本至 v7.0.0