The etcd.io website, built using Hugo and hosted on Netlify.
Visit https://gitpod.io/#https://github.com/etcd-io/website to launch a Gitpod.io IDE that will allow you to build, preview and make changes to this repo.
To build and serve the site, you'll need the latest LTS release of Node. Like Netlify, we use nvm, the Node Version Manager, to install and manage Node versions:
$ nvm install --lts- Clone this repo.
- From a terminal window, change to the cloned repo directory.
- Get NPM packages and git submodules, including the the Docsy theme:
$ npm install
To locally serve the site at localhost:8888, run the following command:
$ npm run serveNOTE: If you want to check links locally, you (temporarily) might have some extra setup to do. For details, see issue #459.
To build and check links, run these commands:
$ npm run build
$ npm run check-linksWe welcome issues and PRs! For details, see Contributing.
If you submit a PR, Netlify will automatically create a deploy preview so that you can view your changes. Once merged, Netlify automatically deploys to the production site etcd.io.
IMPORTANT: this section is out-of-date, see issue #406.
Follow these steps to add documentation for a newly released version of etcd, vX.Y:
-
Recursively copy the most recent existing version directory under content/en/docs into
content/en/docs/vX.Y, wherevX.Yis the new version of etcd. For example, to createv3.9fromv3.8:cp -r content/en/docs/v3.8 content/en/docs/v3.9
-
In the
_index.mdfile at the root of the new directory, update the front matter to reflect the new version. For example, for a draft version (see content/en/docs/v3.8/_index.md):--- title: vX.Y docs cascade: version: vX.Y versName: &name vX.Y-DRAFT git_version_tag: main exclude_search: true page_warning: the documentation is in **DRAFT** status. linkTitle: *name simple_list: true weight: -XY0 # Weight for doc version vX.Y should be -XY0 ---
When the version is released, set
versNametovX.Y, setgit_version_tagto the release tag (for examplevX.Y.0), setexclude_searchtofalse, and removepage_warning. See content/en/docs/v3.7/_index.md for a released version. -
Add the version to the
params.versionslist in the config.yaml configuration file, as a newversion/urlentry at the top of the list:versions: - version: vX.Y url: /docs/vX.Y/
-
If the version is meant to be the latest stable version of etcd, change the
params.latest_stable_versionparameter inconfig.yamlto the new version. -
Submit a pull request with the changes.