You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contribute/locally.md
+15-23Lines changed: 15 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,14 @@
1
1
# Contribute locally
2
2
3
-
Follow these steps to contribute to Elastic docs.
4
-
5
-
*[Prerequisites](#prerequisites)
6
-
*[Install `docs-builder`](#install-docs-builder)
7
-
*[Clone a content repository](#clone-content)
8
-
*[Build the docs](#build-the-docs)
9
-
*[Write the docs](#write-docs)
10
-
*[Push your changes](#push-changes)
3
+
This document describes the process to set up Elastic documentation repositories locally, enabling you to contribute effectively.
11
4
12
5
## Prerequisites [#prerequisites]
13
6
14
7
To write and push updates to Elastic documentation, you need the following:
15
8
16
-
1.**A code editor**: we recommend [Visual Studio Code](https://code.visualstudio.com/download)
17
-
1.**Git installed on your machine**: learn how [here](https://github.com/git-guides/install-git)
18
-
1.**A GitHub account**: sign up [here](https://github.com/)
9
+
***A code editor**: We recommend [Visual Studio Code](https://code.visualstudio.com/download)
10
+
***Git installed on your machine**: To install Git, see [How to install Git](https://github.com/git-guides/install-git)
11
+
***A GitHub account**: Sign up for an account on [Github](https://github.com/)
19
12
20
13
## Install `docs-builder`[#install-docs-builder]
21
14
@@ -24,7 +17,7 @@ There are two different ways to install and run `docs-builder`:
24
17
1. Download, extract, and run the binary (recommended).
25
18
1. Clone the repository and build the binary from source.
26
19
27
-
This guide uses the first option. If you'd like to clone the repository and build from source, learn how in the [project readme](https://github.com/elastic/docs-builder?tab=readme-ov-file#docs-builder).
20
+
This guide follows the first option. If you'd like to clone the repository and build from source, learn how in the [project readme](https://github.com/elastic/docs-builder?tab=readme-ov-file#docs-builder).
28
21
29
22
:::::{tab-set}
30
23
@@ -38,18 +31,17 @@ This guide uses the first option. If you'd like to clone the repository and buil
38
31
curl -sL https://ela.st/docs-builder-install | sh
39
32
```
40
33
41
-
This downloads the latest binary, makes it executable, and installs it to your user PATH.
34
+
This downloads the latest binary to `/usr/local/bin`, makes it an executable, and installs it to your user PATH. This means you can use the `docs-builder` command from any location of your machine to deploy and run documentation repositories like `docs-builder`, `docs-content` and so on.
35
+
42
36
You can optionally specify a specific version to install:
43
37
44
38
```sh
45
39
DOCS_BUILDER_VERSION=0.40.0 curl -sL https://ela.st/docs-builder-install | sh
46
40
```
47
41
48
-
To download and install the binary file manually, refer to [Releases](https://github.com/elastic/docs-builder/releases) on GitHub.
49
-
50
42
2.**Run docs-builder from a docs folder**
51
43
52
-
Use the `serve` command from any docs folder to start serving the documentation at [http://localhost:3000](http://localhost:3000):
44
+
Use the `serve` command from any `docs` folder to start serving the documentation at [http://localhost:3000](http://localhost:3000):
53
45
54
46
```sh
55
47
docs-builder serve
@@ -101,18 +93,18 @@ If you get a `Permission denied` error, make sure that you aren't trying to run
101
93
## Clone a content repository [#clone-content]
102
94
103
95
:::{tip}
104
-
Documentation is hosted in many repositories across Elastic. If you're unsure which repository to clone, you can use the **Edit this page** link on any documentation page to determine where the source file is hosted.
96
+
Documentation is hosted in many repositories across Elastic. If you're unsure which repository to clone, you can use the **Edit this page** link on any documentation page to determine the location of the source file.
105
97
:::
106
98
107
-
In this guide, we'll clone the [`docs-content`](https://github.com/elastic/docs-content) repository. The `docs-content` repository is the home for most narrative documentation at Elastic. Clone this repo to a directory of your choice:
99
+
Clone the [`docs-content`](https://github.com/elastic/docs-content) repository to a directory of your choice. The `docs-content` repository is the home for most narrative documentation at Elastic.
We write docs in Markdown. Refer to our [syntax](../syntax/index.md) guide for the flavor of Markdown that we support and all of our custom directives that enable you to add a little extra pizzazz to your docs.
107
+
We write docs in Markdown. Refer to our [syntax](../syntax/index.md) guide for the flavor of Markdown we support and all of our custom directives that enable you to add a little extra pizzazz to your docs.
116
108
117
109
This documentation is **cumulative**. This means that a new set of docs is not published for every minor release. Instead, each page stays valid over time and incorporates version-specific changes directly within the content. [Learn how to write cumulative documentation](cumulative-docs.md).
118
110
@@ -121,13 +113,13 @@ This documentation is **cumulative**. This means that a new set of docs is not p
121
113
122
114
## Build the docs
123
115
124
-
Before pushing your changes, check that your changes build successfully.
116
+
Before pushing your changes, verify all of them locally .
125
117
126
118
```
127
119
docs-builder
128
120
```
129
121
130
-
The build process informs you of any critical errors or warnings. It also shows less critical issues as Hints. Make sure not to introduce any new build errors, warnings, or hints.
122
+
The build process informs you of any critical errors or warnings. It also shows less critical issues as Hints. Make sure you don't introduce any new build errors, warnings, or hints.
0 commit comments