Hexo常用命令
1 2 3 4 5 6 7
| hexo new "postName" #新建文章 hexo new page "pageName" #新建页面 hexo generate #生成静态页面至public目录 hexo server #开启预览访问端口(默认端口4000,'ctrl + c'关闭server) hexo deploy #将.deploy目录部署到GitHub hexo help # 查看帮助 hexo version #查看Hexo的版本
|
本地图片插件使用
主配置文件中将post_asset_folder:true
npm install https://github.com/CodeFalling/hexo-asset-image –save
利用TravisCI实现文档提交的自动部署
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 27 28 29 30 31 32 33 34 35
| language: node_js node_js: stable
branches: only: - code
cache: directories: - node_modules
before_install: - npm install -g hexo-cli
install: - npm install
script: - hexo clean - hexo generate
after_success: - git init - git config --global user.name "huguanghui" - git config --global user.email "522146829@qq.com" - sed -i "s/GH_TOKEN/${GH_TOKEN}/g" ./_config.yml - hexo deploy
|
hexo插件安装