tronik.conf

coffee to code

Redeploying Hexo via Github Repository

This is a basic overview on how to redeploy the Hexo environment from source placed on Github. Assuming you’ve backed up your Hexo source.

.gitignore

Before anything, remember packages.json should be added to your .gitignore - this can conflict with your other working environments. Example of my .gitignore is below.

1
2
3
4
5
6
7
8
.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
package.json

Clone A Local Copy

1
2
$ cd ~/github/
$ git clone git@github.com:kaichi/kaichi.github.io-source.git

Backup .git and _config.yml to Desktop

Cut and paste both .git and _config.yml to a safe place, because hexo init will removing / overwriting these critical assets.

Initiate Hexo

Assuming that git, node.js, and hexo are installed on your new workstation, proceed.

1
2
$ cd kaichi.github.io-source
$ hexo init

Install Dependencies / Plugins

Below is examples of my setup.

1
2
$ npm install hexo-deployer-git --save
$ npm install hexo-soundcloud -- save

Copy .git and _config.yml to Hexo environment

Once the hexo environment is setup, copy the .git and _config.yml to your working enviroment. You can now use hexo generate and deploy, git add, commit, push, and pull.

Join the #Hexo IRC channel!

hexo irc channel

Find us on Freenode! Try a native client like Hexchat (Windows/OSX/Linux) or Textual (OSX) or register up for IRCCloud.com!

1
2
/server irc.freenode.net
/join #hexo