1 | # Welcome to GitDocs
|
2 |
|
3 | Easy to use, SEO-friendly, beautiful documentation that lives in your git repo.
|
4 |
|
5 | ## How does it work?
|
6 |
|
7 | It turns markdown files in your `/docs` folder (or wherever you choose) into rich, interactive documentation. Out of the box you get helpers like syntax highlighting using [Prism](prismjs.com) or [Highlight.js](https://highlightjs.org/), callouts like [Tip](writing/helpers#tip), <Highlight>highlight</Highlight> and much more. You can even extend GitDocs to support custom components using libraries like React and Vue.
|
8 |
|
9 | `gitdocs` is distributed as a package on npm. It is a cli that you can simply install with `npm install gitdocs -g`. You can run `gitdocs serve` to preview your docs or `gitdocs build` to generate a static site wherever you like.
|
10 |
|
11 | ## Installation
|
12 |
|
13 | Using npm:
|
14 |
|
15 | ```bash
|
16 | npm i -g gitdocs
|
17 | ```
|
18 |
|
19 | Using Yarn:
|
20 |
|
21 | ```bash
|
22 | yarn global add gitdocs
|
23 | ```
|
24 |
|
25 | ## Quick Start
|
26 |
|
27 | Assuming you have a folder with markdown files at `/docs`, you can automatically preview your docs site by running:
|
28 |
|
29 | ```bash
|
30 | gitdocs serve
|
31 | ```
|
32 |
|
33 | and build your site to any destination with:
|
34 |
|
35 | ```bash
|
36 | gitdocs build --output="docs-dist"
|
37 | ```
|
38 |
|
39 | - The `readme.md` in your repo will be used as the default homepage for your docs
|
40 | - `docs/docs.json` allows you to specify your project settings like the version, name and much more
|
41 | - The navigation will automatically be built using your docs folder structure, but you can override this in `docs.json` to generate your own navigation. |
\ | No newline at end of file |