text
stringlengths
0
59.1k
## Running the website using a container
To build the site in a container, run the following:
```bash
# You can set $CONTAINER_ENGINE to the name of any Docker-like container tool
# Render the full website
make container-serve
# Render only a specific language segment (e.g., English)
make container-serve segments=en
# Render multiple languages (e.g., English and Korean)
make container-serve segments=en,ko
```
**💡 Tip:** Using _Hugo segments_ speeds up local preview builds, by rendering only selected language(s).
If you see errors, it probably means that the Hugo container did not have enough computing resources available. To solve it, increase the amount of allowed CPU and memory usage for Docker on your machine ([macOS](https://docs.docker.com/desktop/settings/mac/) and [Windows](https://docs.docker.com/desktop/settings/windo...
Open up your browser to <http://localhost:1313> to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
## Running the website locally using Hugo
To install dependencies, deploy and test the site locally, run:
- For macOS and Linux
```bash
npm ci
# Render the full site (default)
make serve
# Render only a specific language segment
make serve segments=en
# Render multiple language segments
make serve segments=en,ko
```
**💡 Tip:** Hugo segments are defined in `hugo.toml` and allow faster rendering by limiting the scope to specific language(s).
- For Windows (PowerShell)
```powershell
npm ci
hugo.exe server --buildFuture --environment development
```
This will start the local Hugo server on port 1313. Open up your browser to <http://localhost:1313> to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
## Building the API reference pages
The API reference pages located in `content/en/docs/reference/kubernetes-api` are built from the Swagger specification, also known as OpenAPI specification, using <https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs>.
To update the reference pages for a new Kubernetes release follow these steps:
1. Pull in the `api-ref-generator` submodule:
```bash
git submodule update --init --recursive --depth 1
```
2. Update the Swagger specification:
```bash
curl 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json' > api-ref-assets/api/swagger.json
```
3. In `api-ref-assets/config/`, adapt the files `toc.yaml` and `fields.yaml` to reflect the changes of the new release.
4. Next, build the pages:
```bash
make api-reference
```
You can test the results locally by building and serving the site from a container:
```bash
make container-serve
```
In a web browser, go to <http://localhost:1313/docs/reference/kubernetes-api/> to view the API reference.
5. When all changes of the new contract are reflected into the configuration files `toc.yaml` and `fields.yaml`, create a Pull Request with the newly generated API reference pages.
## Troubleshooting
If you experience any issues with running website locally, please refer
to the [Troubleshooting section](https://kubernetes.io/docs/contribute/new-content/preview-locally/#troubleshooting) of the contributing documentation.
## Get involved with SIG Docs
Learn more about SIG Docs Kubernetes community and meetings on the [community page](https://github.com/kubernetes/community/tree/master/sig-docs#meetings).