Skip to content

Commit 00c0eb7

Browse files
committed
Add step for building the docs
1 parent 377ddc0 commit 00c0eb7

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

docs/contribute/locally.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Follow these steps to contribute to Elastic docs.
99
* [Step 4: Write the docs](#step-four)
1010
* [Step 5: Push your changes](#step-five)
1111

12-
## Prerequisites
12+
## Prerequisites [#prerequisites]
1313

1414
To write and push updates to Elastic documentation, you need the following:
1515

1616
1. **A code editor**: we recommend [Visual Studio Code](https://code.visualstudio.com/download)
1717
1. **Git installed on your machine**: learn how [here](https://github.com/git-guides/install-git)
1818
1. **A GitHub account**: sign up [here](https://github.com/)
1919

20-
## Install `docs-builder` [#step-one]
20+
## Install `docs-builder` [#install-docs-builder]
2121

2222
There are two different ways to install and run `docs-builder`:
2323

@@ -93,7 +93,7 @@ If you get a `Permission denied` error, make sure that you aren't trying to run
9393
::::
9494

9595

96-
## Clone a content repository [#step-two]
96+
## Clone a content repository [#clone-content]
9797

9898
:::{tip}
9999
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-
105105
git clone https://github.com/elastic/docs-content.git
106106
```
107107

108-
## Serve the documentation [#step-three]
108+
## Write the docs [#write-docs]
109+
110+
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]
109130

110131
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.
111132

@@ -148,23 +169,3 @@ docs-builder serve -p .\migration-test
148169
Now you should be able to view the documentation locally by navigating to http://localhost:3000.
149170
:::::
150171
::::::
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

Comments
 (0)