D 01. Cloning and installing - ml-archive/blog GitHub Wiki

Prerequisites

Please install the following:

  • node.js - v. 6.x or above
  • npm v. 3.x or above
    • $ npm install npm@latest -g
    • npm comes bundled with node.js, but it is an earlier version, so upgrading it is required
  • gulp, hexo-cli
    • $ npm install gulp hexo-cli -g

Installing

  • Clone or fork the repo
  • From the project root run the following to install dependencies:
    • $ npm install
  • Set up Git Flow:
    • $ git flow init
    • Chose all the defaults

Running the site locally

You can run the site locally and have it reload as you update files with either of the following commands:

  • $ npm run theme
  • $ npm run write

currently there is no difference in the two tasks, but later updates to the tooling will change this

GOTCHA: Disable Caching in Chrome

We cache the hell out of the site, which can be pretty annoying when working locally. We are looking into a viable fix for this, but for now you can disable the caching through Chrome's dev-tools:

  • Open dev-tools
  • Go to the Application tab
  • Select Service Workers
  • Enable Bypass for network