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
+25-24Lines changed: 25 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,15 @@ Follow these steps to contribute to Elastic docs.
9
9
*[Step 4: Write the docs](#step-four)
10
10
*[Step 5: Push your changes](#step-five)
11
11
12
-
## Prerequisites
12
+
## Prerequisites[#prerequisites]
13
13
14
14
To write and push updates to Elastic documentation, you need the following:
15
15
16
16
1.**A code editor**: we recommend [Visual Studio Code](https://code.visualstudio.com/download)
17
17
1.**Git installed on your machine**: learn how [here](https://github.com/git-guides/install-git)
18
18
1.**A GitHub account**: sign up [here](https://github.com/)
19
19
20
-
## Install `docs-builder`[#step-one]
20
+
## Install `docs-builder`[#install-docs-builder]
21
21
22
22
There are two different ways to install and run `docs-builder`:
23
23
@@ -93,7 +93,7 @@ If you get a `Permission denied` error, make sure that you aren't trying to run
93
93
::::
94
94
95
95
96
-
## Clone a content repository [#step-two]
96
+
## Clone a content repository [#clone-content]
97
97
98
98
:::{tip}
99
99
Documentation lives 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 lives.
@@ -105,7 +105,28 @@ In this guide, we'll clone the [`docs-content`](https://github.com/elastic/docs-
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.
111
+
112
+
## Build the docs
113
+
114
+
Before pushing your changes, check that your changes build successfully.
115
+
116
+
```
117
+
docs-builder
118
+
```
119
+
120
+
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.
121
+
122
+
## Push your changes [#push-changes]
123
+
124
+
After you've made your changes locally:
125
+
126
+
*[Push your commits](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository)
127
+
*[Open a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
128
+
129
+
## Local preview [#local-docs-preview]
109
130
110
131
Static-site generators like docs-builder can serve docs locally. This means you can edit the source and see the result in the browser in real time.
Now you should be able to view the documentation locally by navigating to http://localhost:3000.
149
170
:::::
150
171
::::::
151
-
152
-
## Write the docs [#step-four]
153
-
154
-
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.
155
-
156
-
## Push your changes [#step-five]
157
-
158
-
After you've made your changes locally:
159
-
160
-
*[Push your commits](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository)
161
-
*[Open a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
162
-
163
-
## View the preview
164
-
165
-
You can open a docs preview from the Deployments page of the repository. For example, [https://github.com/elastic/docs-content/deployments](https://github.com/elastic/docs-content/deployments).
166
-
167
-
1. Select the pull request or branch.
168
-
2. Select the ↗ icon next to the timestamp.
169
-
170
-
The preview URL is in the form `https://docs-v3-preview.elastic.dev/elastic/<repository>/tree/branch`.
0 commit comments