From a5fbc7cff418b06c62c6df2dd90d969e30498c41 Mon Sep 17 00:00:00 2001 From: J Stickler Date: Thu, 9 Feb 2023 06:38:52 -0500 Subject: [PATCH] Updated CONTRIBUTING file for docs. (#8431) --- CONTRIBUTING.md | 20 ++++++++++++++++++++ docs/README.md | 2 ++ 2 files changed, 22 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 935ff16a05..f962ee6768 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -130,3 +130,23 @@ import ( "github.com/grafana/loki/pkg/logql" ) ``` + +## Contribute to documentation + +We're glad you're here to help make our technical documentation even better for Loki users. + +The Grafana docs team has created a [Writer's Toolkit](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-documentation/) that includes information about how we write docs, a [Style Guide](https://grafana.com/docs/writers-toolkit/style-guide/), and templates to help you contribute to the Loki documentation. + +The Loki documentation is written using the CommonMark flavor of markdown, including some extended features. For more information about markdown, you can see the [CommonMark specification](https://spec.commonmark.org/), and a [quick reference guide](https://commonmark.org/help/) for CommonMark. + +Loki uses the static site generator [Hugo](https://gohugo.io/) to generate the documentation. Loki uses a continuous integration (CI) action to sync documentation to the [Grafana website](https://grafana.com/docs/loki/latest). The CI is triggered on every merge to main in the `docs` subfolder. + +You can preview the documentation locally after installing [Docker](https://www.docker.com/) or [Podman](https://podman.io/). + +To get a local preview of the documentation: +1. Run Docker (or Podman). +2. Navigate to the directory with the makefile, `/loki/docs`. +3. Run the command `make docs`. This uses the `grafana/docs` image which internally uses Hugo to generate the static site. +4. Open http://localhost:3002/docs/loki/latest/ to review your changes. + +> Note that `make docs` uses a lot of memory. If it crashes, increase the memory allocated to Docker and try again. diff --git a/docs/README.md b/docs/README.md index 5201cda98a..4e964e0cab 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,3 +4,5 @@ Like Prometheus, but for logs!

Please see the [Documentation Site](https://grafana.com/docs/loki/latest/) The files in this directory are used to generate it but consequently the links don't work in Github. + +To contribute to these docs, refer to the `Documentation` section in [CONTRIBUTING.md](../CONTRIBUTING.md). \ No newline at end of file