Commit 71b62f5c by Torkel Ödegaard Committed by GitHub

Create README.md

parent 922073a3
# Building The Docs # Building The Docs
To build the docs locally, you need to have docker installed. The To build the docs locally, you need to have docker installed. The
docs are built using a custom [docker](https://www.docker.com/) image docs are built using a hugo.
and the [mkdocs](http://www.mkdocs.org/) tool.
**Prepare the Docker Image**: **Prepare the Docker Image**:
...@@ -11,19 +10,19 @@ when running ``make docs-build`` depending on how your system's docker ...@@ -11,19 +10,19 @@ when running ``make docs-build`` depending on how your system's docker
service is configured): service is configured):
``` ```
$ git clone https://github.com/grafana/grafana.org git clone https://github.com/grafana/grafana.org
$ cd grafana.org cd grafana.org
$ make docs-build make docs-build
``` ```
**Build the Documentation**: **Build the Documentation**:
Now that the docker image has been prepared we can build the Now that the docker image has been prepared we can build the
docs. Switch your working directory back to the directory this file grafana docs and start a docs server. Switch your working directory back to the directory this file
(README.md) is in and run (possibly with ``sudo``): (README.md) is in and run (possibly with ``sudo``):
``` ```
$ make docs make watch
``` ```
This command will not return control of the shell to the user. Instead This command will not return control of the shell to the user. Instead
...@@ -32,4 +31,21 @@ we created in the previous step. ...@@ -32,4 +31,21 @@ we created in the previous step.
Open [localhost:3004](http://localhost:3004) to view the docs. Open [localhost:3004](http://localhost:3004) to view the docs.
### Images & Content
All markdown files are located in this repo (main grafana repo). But all images are added to the https://github.com/grafana/grafana.org repo. So the process of adding images is a bit complicated.
First you need create a feature (PR) branch of https://github.com/grafana/grafana.org so you can make change. Then add the image to the `/static/img/docs` directory. Then make a commit that adds the image.
The run
```
make docs-build
```
This will rebuild the docs docker container.
To be able to use the image your have to quit (CTRL-C) the `make watch` command (that you run in the same directory as this README). Then simply rerun `make watch`, it will restart the docs server but now with access to your image.
### Editing content
Changes to the markdown files should automatically cause a docs rebuild and live reload should reload the page in your browser.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment