hexo travis github 集成

Jun 5, 2017 - 1 minutes
跟 hugo travis github 自动化 大致相同,只是发布有些不同 用hexo用 hexo-deployer-git 插件发布 只需要创建 raw 分支, master hexo-deployer-git 自动创建 touch .travis/ssh_config 编辑ssh_config Host github.com User git StrictHostKeyChecking no IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes .travis.yml 配置 language: node_js branches: only: - raw # 设置自动化部署的分支 before_install: - export TZ='Asia/Shanghai' # 设置时区 - npm install -g hexo - npm install -g hexo-cli # 将xxxxxxxxxxx替换上面生成的内容 # 这里面的文件路径可根据自己的情况进行修改 # 解密id_rsa_blog.enc 输出到.ssh/文件夹下,命名为id_rsa - openssl aes-256-cbc -K $encrypted_xxxxxxxxxxx_key -iv $encrypted_xxxxxxxxxxx_iv -in .

hugo travis github 自动化

Jun 5, 2017 - 2 minutes
hugo 是 go 编写的 blog生成器 比 ruby 的 jekyll 和 nodejs 的 hexo 生成速度快 好处 hugo安装方便,生成快 集成travis,只需要下载raw分支,新增post,push上去就可以了,本机什么都不用做,甚至不用安装hugo 安装hugo go开发,二进制,可直接下载对应版本的releases放到系统PATH 或包关联安装 brew,apt,yaourt wget https://github.com/spf13/hugo/releases/download/v0.21/hugo_0.21_Linux-64bit.tar.gz tar -xvf hugo_0.21_Linux-64bit.tar.gz sudo cp hugo /usr/local/bin 生成blog git管理, 挑选theme设置gitsubmodule, 根据theme编辑 config.toml, 否则可能报错 hugo new site blog cd blog git init git check -b raw git submodule add https://github.com/gyorb/hugo-dusk.git themes/hugo-dusk echo 'public/' > .gitignore touch Makefile #否则会报 no buildable Go source files git add .