Preview and build locally

Preview and build locally

The K8sGateway documentation is built by using the static site generator Hugo. As you write your content, you can locally preview your changes.

Before you begin

  1. Download and install the hugo CLI version 0.135.0. Make sure to download the extended version to ensure all features are available that are required to build the site.

  2. Make sure that hugo is installed.

    hugo version

    Example output:

    hugo v0.135.0-f30603c47f5205e30ef83c70419f57d7eb7175ab+extended darwin/arm64 BuildDate=2024-09-27T13:17:08Z VendorInfo=gohugoio
  3. Install the Node.js dependencies. If you do not have Node.js and npm installed on your machine, follow the instructions here to install them.

    npm install

Build the site locally

  1. Build the site locally.

    hugo server -D
  2. Open the site. The local preview is available at localhost:1313.