A CLI for the Node.js port sdelements/node-slate of lord/slate
This CLI allows you to use Slate while keeping your documentation and features together in the same branch and repo. To serve the documentation from Git Pages, select master branch /docs folder
as your source.
Installation
yarn add --dev node-slate-cli
Folder Structure
.└── src/ └── docs/ ├── css/ ├── fonts/ ├── images/ ├── document1.md └── document2.md
At compile time, all custom css
, fonts
, and images
will be pulled into the ./docs
directory. All Markdown files will be comibined into the index.html
.
Configurations
Place a slate-config.yml
file in the root of your project. These are the default configurations that you can override:
title: API Reference language_tabs: - bash - ruby - python - javascript toc_footers: - <a href='#'>Sign Up for a Developer Key</a> - <a href='https://github.com/tripit/slate'>Documentation Powered by Slate</a> search: true highlight_theme: monokai
CLI
Build
Compile markdown to static site from ./src/docs
to ./docs
:
slate-cli build
Option | Description |
---|---|
--no-compress | Skips uglify steps |
Serve
Run a dev server that live-reloads at http://localhost:4567:
slate-cli serve