Skip to content

Commit d43c65f

Browse files
refactor contributing to the docs guide (#45273) (#45391)
(cherry picked from commit 0d66ec8) Co-authored-by: Colleen McGinnis <[email protected]>
1 parent 9753647 commit d43c65f

File tree

1 file changed

+17
-47
lines changed

1 file changed

+17
-47
lines changed

docs/extend/contributing-docs.md

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,16 @@
22
mapped_pages:
33
- https://www.elastic.co/guide/en/beats/devguide/current/contributing-docs.html
44
applies_to:
5-
stack: discontinued 8.18
5+
stack: ga 9.0
66
---
77

8-
# Contributing to the docs [contributing-docs]
9-
10-
The Beats documentation follows the tagging guidelines described in the [Docs HOWTO](https://github.com/elastic/docs/blob/master/README.asciidoc). However it extends these capabilities in a couple ways:
11-
12-
* The documentation makes extensive use of [AsciiDoc conditionals](https://docs.asciidoctor.org/asciidoc/latest/directives/conditionals/) to provide content that is reused across multiple books. This means that there might not be a single source file for each published HTML page. Some files are shared across multiple books, either as complete pages or snippets. For more details, refer to [Where to find the Beats docs source](#where-to-find-files).
13-
* The documentation includes some files that are generated from YAML source or pieced together from content that lives in `_meta` directories under the code (for example, the module and exported fields documentation). For more details, refer to [Generated docs](#generated-docs).
14-
15-
16-
## Where to find the Beats docs source [where-to-find-files]
17-
18-
Because the Beats documentation makes use of shared content, doc generation scripts, and componentization, the source files are located in several places:
19-
20-
| Documentation | Location of source files |
21-
| --- | --- |
22-
| Main docs for the Beat, including index files | `<beatname>/docs` |
23-
| Shared docs and Beats Platform Reference | `libbeat/docs` |
24-
| Processor docs | `docs` folders under processors in `libbeat/processors/`,`x-pack/<beatname>/processors/`, and `x-pack/libbeat/processors/` |
25-
| Output docs | `docs` folders under outputs in `libbeat/outputs/` |
26-
| Module docs | `_meta` folders under modules and datasets in `libbeat/module/`,`<beatname>/module/`, and `x-pack/<beatname>/module/` |
27-
28-
The [conf.yaml](https://github.com/elastic/docs/blob/master/conf.yaml) file in the `docs` repo shows all the resources used to build each book. This file is used to drive the classic docs build and is the source of truth for file locations.
29-
30-
::::{tip}
31-
If you can’t find the source for a page you want to update, go to the published page at www.elastic.co and click the Edit link to navigate to the source.
32-
::::
33-
34-
35-
The Beats documentation build also has dependencies on the following files in the [docs](https://github.com/elastic/docs) repo:
36-
37-
* `shared/versions/stack/<version>.asciidoc`
38-
* `shared/attributes.asciidoc`
8+
# Contributing to the docs
399

10+
The Beats documentation is written in Markdown and is built using [elastic/docs-builder](https://github.com/elastic/docs-builder). Most Markdown files should be edited directly, but some Markdown files are generated.
4011

4112
## Generated docs [generated-docs]
4213

43-
After updating `docs.asciidoc` files in `_meta` directories, you must run the doc collector scripts to regenerate the docs.
14+
After updating `docs.md` files in `_meta` directories, you must run the doc collector scripts to regenerate the docs.
4415

4516
Make sure you [set up your Beats development environment](./index.md#setting-up-dev-environment) and use the correct Go version. The Go version is listed in the `version.asciidoc` file for the branch you want to update.
4617

@@ -52,7 +23,6 @@ To run the docs collector scripts, change to the beats directory and run:
5223
The `make update` command overwrites files in the `docs` directories **without warning**. If you accidentally update a generated file and run `make update`, your changes will be overwritten.
5324
::::
5425

55-
5626
To format your files, you might also need to run this command:
5727

5828
`make fmt`
@@ -61,24 +31,24 @@ The make command calls the following scripts to generate the docs:
6131

6232
[auditbeat/scripts/docs_collector.py](https://github.com/elastic/beats/blob/main/auditbeat/scripts/docs_collector.py) generates:
6333

64-
* `auditbeat/docs/modules_list.asciidoc`
65-
* `auditbeat/docs/modules/*.asciidoc`
34+
* `docs/reference/auditbeat/auditbeat-modules.md`
35+
* `docs/reference/auditbeat/auditbeat-module-*.md`
6636

6737
[filebeat/scripts/docs_collector.py](https://github.com/elastic/beats/blob/main/filebeat/scripts/docs_collector.py) generates:
6838

69-
* `filebeat/docs/modules_list.asciidoc`
70-
* `filebeat/docs/modules/*.asciidoc`
39+
* `docs/reference/filebeat/filebeat-modules.md`
40+
* `docs/reference/filebeat/filebeat-module-*.md`
7141

7242
[metricbeat/scripts/mage/docs_collector.go](https://github.com/elastic/beats/blob/main/metricbeat/scripts/mage/docs_collector.go) generates:
7343

74-
* `metricbeat/docs/modules_list.asciidoc`
75-
* `metricbeat/docs/modules/*.asciidoc`
44+
* `docs/reference/metricbeat/metricbeat-modules.md`
45+
* `docs/reference/metricbeat/metricbeat-module-*.md`
7646

77-
[libbeat/scripts/generate_fields_docs.py](https://github.com/elastic/beats/blob/main/libbeat/scripts/generate_fields_docs.py) generates
47+
[libbeat/scripts/generate_fields_docs.py](https://github.com/elastic/beats/blob/main/libbeat/scripts/generate_fields_docs.py) generates:
7848

79-
* `auditbeat/docs/fields.asciidoc`
80-
* `filebeat/docs/fields.asciidoc`
81-
* `heartbeat/docs/fields.asciidoc`
82-
* `metricbeat/docs/fields.asciidoc`
83-
* `packetbeat/docs/fields.asciidoc`
84-
* `winlogbeat/docs/fields.asciidoc`
49+
* `docs/reference/auditbeat/exported-fields.md`
50+
* `docs/reference/filebeat/exported-fields.md`
51+
* `docs/reference/heartbeat/exported-fields.md`
52+
* `docs/reference/metricbeat/exported-fields.md`
53+
* `docs/reference/packetbeat/exported-fields.md`
54+
* `docs/reference/winlogbeat/exported-fields.md`

0 commit comments

Comments
 (0)