Here are the steps to make it work:
As stated in the docs, run these commands to start a new blog:
$ npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ npm install
$ hexo server
At this point your site will be running with the dev server.
Now shut down the dev server and use
$ hexo generate
to generate the source files (in the /public
folder)
At this point, if you simply open the index.html in Chrome (or any other browser), it won't work because the paths to the external resources are broken.
You need to host the files on a web server of some sort. If you don't already have apache running somewhere on your machine, here is a quick way to run a node static web server:
$ npm -g install static-server
will install a simple http server to serve static resource files from a local directory.
then navigate to your public folder:
$ cd public
and start off the web server:
$ static-server
Open your browser at http://localhost:9080
and your site should be up and running.