grafana/docs
bergquist 5d720674e3 Merge branch 'master' into add_google_hangouts_chat_notifier
* master: (322 commits)
  graphInterval needs to update after query execution, fixes #14364
  Explore: Parse initial dates
  Aligned styling of stats popover/box with rest of grafana & minor css refactoring
  Prometheus: Make result transformer more robust for empty responses
  Rebase fixes
  Explore: Logging line parsing and field stats
  fixed unit tests
  made unknown color theme aware and sync with graph color, some minor cleanup
  Explore: improve error handling
  use render props instead of cloneElement
  sort of a hacky way to figure if the small variation should be used for the label
  add basic button group component, using the the same label style as is
  explore logs styling
  wip: alternative level styling & hover effect
  wip: explore logs styling
  more detailed error message for loki
  If user login equals user email, only show the email once #14341
  UserPicker and TeamPicker should use min-width instead of fixed widths to avoid overflowing form buttons.  #14341
  wip: explore logs styling
  restoring monospace & making sure width are correct when hiding columns
  ...
2018-12-07 14:31:13 +01:00
..
sources Merge branch 'master' into add_google_hangouts_chat_notifier 2018-12-07 14:31:13 +01:00
config.toml docs: minor fix 2017-03-17 19:33:31 +01:00
Dockerfile docs: added versions file 2018-01-30 13:28:16 +01:00
Makefile docs: updated make file for docs to support specifying env and version 2017-04-27 12:17:22 +02:00
publish.sh docs: add publish bash script 2017-05-02 10:20:09 +02:00
README.md Fix spelling of your and you're 2018-09-25 12:38:02 +02:00
s3_website.json Added grafana 1.x docs to main repo 2015-03-10 08:56:03 +01:00
VERSION docs: updated version 2018-01-31 08:49:04 +01:00
versions.json new stable docs version 2018-12-03 12:16:08 +01:00
yarn.lock test: added first react snapshot test 2017-10-22 12:48:20 +02:00

Building The Docs

To build the docs locally, you need to have docker installed. The docs are built using Hugo - a static site generator.

Prepare the Docker Image:

Git clone grafana/grafana.org repo. Run these commands in the root of that repo. Note that you may require sudo when running make docs-build depending on how your system's docker service is configured):

git clone https://github.com/grafana/grafana.org
cd grafana.org
make docs-build

Build the Documentation:

Now that the docker image has been prepared we can build the grafana docs and start a docs server.

If you have not cloned the Grafana repository already then:

cd ..
git clone https://github.com/grafana/grafana

Switch your working directory to the directory this file (README.md) is in.

cd grafana/docs

An AWS config file is required to build the docs Docker image and to publish the site to AWS. If you are building locally only and do not have any AWS credentials for docs.grafana.org then create an empty file named awsconfig in the current directory.

touch awsconfig

Then run (possibly with sudo):

make watch

This command will not return control of the shell to the user. Instead the command is now running a new docker container built from the image we created in the previous step.

Open 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.

Then run:

make docs-build

This will rebuild the docs docker container.

To be able to use the image you 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.