Overview:
The Documentation site for Datadog is a repository that houses markdown files. It utilizes the Hugo static website generation tool to publish the markdown files to the Datadog documentation site. Contributors are encouraged to make edits by opening pull requests in the repository. The documentation site can be accessed locally by following the installation steps.
Features:
- Contribution: Users can open pull requests to suggest edits to the documentation.
- Edit Button: Most pages on the documentation site have an edit button that redirects users to the respective source file in the repository for making edits directly on the GitHub website.
- Local Deployment: The documentation site can be set up locally using various commands.
Installation:
To set up the documentation site locally, follow these steps:
- Install Node.js and npm (Node.js >=14.16.0).
- Install Python 3 (pyenv can also be used).
- Install Hugo.
- Install Go (at minimum, go version 1.12).
- Install Yarn:
npm install -g yarn
. - Create an SSH key and add it to your GitHub account.
- Clone the documentation repository using the command:
git clone git@github.com:DataDog/documentation.git
. - In the
documentation/
folder, create aMakefile.config
file from theMakefile.config.example
. - If you are a Datadog employee, add your GitHub personal token to the
Makefile.config
. - To run the documentation site locally, execute one of the following commands:
make start-no-pre-build
: Build the lightweight version of the documentation with no extra content.make start
: Build the full documentation with all extra content (integrations, extra pulled files, localized content, etc). This command is only useful if you have a GitHub personal token set up in yourMakefile.config
or if the extra content is available locally.make start-docker
: Build the documentation using the Docker image (For more information, see Docker Development).
- Once the server is running, the documentation will be available at http://localhost:1313. Note that
make start
attempts to pull all dependent repos, either from their origins or from a local cache.
Summary:
The Documentation site for Datadog uses the Hugo static website generation tool to publish markdown files to the Datadog documentation site. It allows users to contribute by opening pull requests and provides an easy way to make edits directly from the GitHub website. The documentation site can be set up locally by following the installation steps, allowing for easy access and testing.