Contribute locally
Follow these steps to contribute to Elastic docs.
- Prerequisites
- Step 1: Install
docs-builder
- Step 2: Clone a content repository
- Step 3: Serve the Documentation
- Step 4: Write docs!
- Step 5: Push your changes
To write and push updates to Elastic documentation, you need the following:
- A code editor: we recommend Visual Studio Code
- Git installed on your machine: learn how here
- A GitHub account: sign up here
There are two different ways to install and run docs-builder
:
- Download, extract, and run the binary (recommended).
- Clone the repository and build the binary from source.
This guide uses the first option. If you'd like to clone the repository and build from source, learn how in the project readme.
Download and run the install script
Run this command to download and install the latest version of
docs-builder
:sudo curl -L https://raw.githubusercontent.com/elastic/docs-builder/refs/heads/main/install.sh | sh
This downloads the latest binary, makes it executable, and installs it to your user PATH.
Run docs-builder from a docs folder
Use the
serve
command from any docs folder to start serving the documentation at http://localhost:3000. The path to thedocset.yml
file that you want to build can be specified with-p
:docs-builder serve
To download and install the binary file manually, refer to Releases on GitHub.
Download and run the install script
Run this command to download and install the latest version of
docs-builder
:iex (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/elastic/docs-builder/refs/heads/main/install.ps1')
This downloads the latest binary, makes it executable, and installs it to your user PATH.
Run docs-builder from a docs folder
Use the
serve
command from any docs folder to start serving the documentation at http://localhost:3000. The path to thedocset.yml
file that you want to build can be specified with-p
:docs-builder serve
To download and install the binary file manually, refer to Releases on GitHub.
Place the docs-builder
binary file in a system path so that you can run it from any folder. On macOS, you can do this by running sudo mv docs-builder /usr/local/bin/docs-builder
.
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.
In this guide, we'll clone the docs-content
repository. The docs-content
repository is the home for narrative documentation at Elastic. Clone this repo to a directory of your choice:
git clone https://github.com/elastic/docs-content.git
Navigate to the
docs-builder
clone location:cd docs-content
Run the Binary: Run the binary with the
serve
command to build and serve the content set to http://localhost:3000. Specify the path to thedocset.yml
file that you want to build with-p
.For example, if
docs-builder
anddocs-content
are in the same top-level directory, you would run:# macOS/Linux ./docs-builder serve -p ./migration-test # Windows .\docs-builder serve -p .\migration-test
Now you should be able to view the documentation locally by navigating to http://localhost:3000.
We write docs in markdown. See our syntax guide for the flavor of markdown that we support and all of our custom directives that enable you to add a little extra pizazz to your docs.
After you've made your changes locally,
soon...