A documentation theme for the Hexo blog framework
hexo-theme-doc is a documentation theme for Hexo, the fast and powerful blog framework powered by Node.js. It differs from other Hexo themes by allowing you to present documentation—especially REST API documentation.
hexo-theme-doc's features include:
Visit our demo to view an example of hexo-theme-doc in action.
Our step-by-step guide aims to get you running with hexo-theme-doc in five minutes or less.
For a deeper dive, check our user documentation.
For more info on our progress, visit the changelog contributions.
There are many ways to contribute to hexo-theme-doc:
Please check our CONTRIBUTING guidelines.
$ npm install hexo-cli -g
Get the theme source and install the dependencies:
$ git clone [email protected]:zalando-incubator/hexo-theme-doc.git $ cd hexo-theme-doc && npm install
Ensure that you can successfully run test and linting tasks:
$ npm run test && npm run lint
$ cd hexo-theme-doc && npm link
Then get the user documentation source:
$ git clone [email protected]:zalando-incubator/hexo-theme-doc.git hexo-theme-doc-site $ cd hexo-theme-doc-site $ git fetch --all && git checkout gh-pages-source $ npm install
The documentation source resides in this repository as well but just on a different branch called:gh-pages-source
Now link the theme package as a dependency (this will use your local version):
$ npm link hexo-theme-doc
Finally run the built-in server:
$ hexo s
Open your browser at http://localhost:4000, and hopefully you'll see the documentation site up and running.
Run tests with Facebook's Jest (currently the only testing tool compatible with hexo-theme-doc):
$ npm run test
To generate coverage reports run:
$ npm run test:coverage
Reports are generated at
target/coverage.Sometimes you'll only need to run one test suite focused on a single problem; do that by running:
$ npm run test --represents a Regular Expression, matching test file path(s)—eg.
npm run jest -- search*.
Lint the code using ESLint (currently the only linting tool compatible with hexo-theme-doc):
$ npm run lint
To apply automatic fixes to your code, run it with the
$ npm run lint --fix
$ npm run compile
Only the maintainers** perform releases. Our preferred workflow:
npm run prerelease
MIT license with exceptions. See the full license for details.
Copyright 2017, Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.