Skip to content

Commit f14b34b

Browse files
committed
add Hugo segment usage instructions for faster local builds
1 parent a345acf commit f14b34b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,20 @@ To build the site in a container, run the following:
5555

5656
```bash
5757
# You can set $CONTAINER_ENGINE to the name of any Docker-like container tool
58+
59+
# Render the full website
5860
make container-serve
61+
62+
# Render only a specific language segment (e.g., English)
63+
make container-serve segments=en
64+
65+
# Render multiple languages (e.g., English and Korean)
66+
make container-serve segments=en,ko
5967
```
6068

61-
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/windows/)).
69+
**💡 Tip:** Using _Hugo segments_ speeds up local preview builds, by rendering only selected language(s).
70+
71+
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/windows/)).
6272

6373
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.
6474

@@ -70,9 +80,19 @@ To install dependencies, deploy and test the site locally, run:
7080

7181
```bash
7282
npm ci
83+
84+
# Render the full site (default)
7385
make serve
86+
87+
# Render only a specific language segment
88+
make serve segments=en
89+
90+
# Render multiple language segments
91+
make serve segments=en,ko
7492
```
7593

94+
**💡 Tip:** Hugo segments are defined in `hugo.toml` and allow faster rendering by limiting the scope to specific language(s).
95+
7696
- For Windows (PowerShell)
7797

7898
```powershell
@@ -82,6 +102,7 @@ To install dependencies, deploy and test the site locally, run:
82102

83103
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.
84104

105+
85106
## Building the API reference pages
86107

87108
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>.

0 commit comments

Comments
 (0)