Get started

Requirements

To get started you need to have a couple of things installed:

Installing Hexo

Once all the requirements are installed, you can install Hexo with npm:

1
$ npm install -g hexo-cli

Quick Start

To quickly bootstrap a documentation website, we have setup an example seed project that can be cloned and used a starting point.

  • Clone the seed project
1
$ git clone https://github.com/zalando-incubator/hexo-theme-doc-seed.git
  • Go into the resulting directory and install the dependencies
1
$ cd hexo-theme-doc-seed && npm install
  • Start the preview server
1
$ hexo s

This command will run a built-in http server and watch for changes.

If you open your browser to http://localhost:4000 you should see the documentation website up and running.
Nice! Now you can start writing your content… have fun!

To know more, please check server and generating from the official Hexo documentation.

Long Start

This section assumes that you are familiar with Hexo usage. For new starters we suggest you have a look at the Quick Start guide.

IMPORTANT If you use hexo init command to setup the project skeleton, you have to uninstall hexo-generator-index with:

1
2
3
$ npm remove hexo-generator-index
$ hexo cache clean
$ hexo s

1
$ npm install hexo-theme-doc --save

Install the required hexo plugins in your project:

1
$ npm install hexo-renderer-ejs hexo-renderer-marked --save
1
2
$ git clone git@github.com:zalando-incubator/hexo-theme-doc.git themes/doc
$ cd themes/doc && npm install --prod

Install the required hexo plugins in your project:

1
$ npm install hexo-renderer-ejs hexo-renderer-marked --save

Activate the theme

Update your project _config.yml

1
theme: ../node_modules/hexo-theme-doc

or

1
theme: doc

If you used GIT to install the theme (not recommended)