gardener / website-generator

Tools to generate the public facing gardener website
Apache License 2.0
11 stars 21 forks source link

Gardener Website Generator

REUSE status

This repository is wired via CI/CD and scripts to listen to component dependencies and upon their release to build a new version of the documentation for them and publish it.

Website Build/Publish Overview

The repositories involved in the process are:

The website builds and deployments are orchestrated by Concourse CI/CD pipeline and triggered upon depending component release or upon changes in /gardener/documentation or /gardener/website-generator repositories. The build results are then pushed to /gardener/website/docs and served as a GitHub Pages site.

Build Locally

Overview

Creating a local version of Docforge will allow you to preview changes you have made to the site locally, without the need to use GitHub UI.

Prerequisites

Before you can setup your local version of the website, you need to have:

Setup

  1. Clone the repository and go to the repo's directory.

  2. Enter git submodule update --init --recursive.

  3. Export the following environment variables:

    export GIT_OAUTH_TOKEN=<token>

  4. cd in hugo directory and run npm install

Build Website

  1. Run make build command

  2. Run cd hugo && hugo serve

Test Local Changes

In order to test local changes, for example gardener/documentation changes, you need to go trough the following steps:

  1. Clone the repository where you will do the changes. We will take for example gardener/documentation.
  2. Make the wanted changes there.
  3. Create ${HOME}/.docforge/config file with the following content in it:

    resourceMappings:
     https://github.com/gardener/documentation: <Path to the cloned documentation repo>
  4. Run make build
  5. Run cd hugo && hugo serve