Setup a blog with hexojs and travis

Introduction

  • Hexo is a fast and powerful site generator designed specifically for personal blogging. There is a lot of plugins to make it even powerful.
  • With the power of travis, you can automate the site generating progress and separate the process of editing from publishing.
  • You can deploy your generated site to github pages, a free and easy-to-use page hosting service.

This article is going to instruct you to setup a blog with these handy tools.

Contents

Install hexojs

Requirements

Install from npm

npm install -g hexo-cli

Basic setup

Once you have hexo installed, you can use following commands to initialize the target folder

hexo init BLOG_DIR
cd BLOG_DIR
npm install

Customization

Writing

  • new post, hexo new [layout] TITLE
  • publish a draft, hexo publish [layout] TITLE

Deploy hexojs to github and gitcafe

Document

deployment

with these commands, you can deploy the web site to the server configured.

hexo deploy

Methods

Deploy hexojs auto builder with travis ci

Configure github pages with custom domain name

https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/

References