From f0cacecc06ab8d9dc46ad3cd57d29d8fe52e7cf4 Mon Sep 17 00:00:00 2001 From: Karen Bradshaw Date: Tue, 30 Jun 2020 16:08:32 -0400 Subject: [PATCH 1/2] add info about updating docsy theme --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c631b0dc8..7c4809287f 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,27 @@ This repository contains the assets required to build the [Kubernetes website an See the [official Hugo documentation](https://gohugo.io/getting-started/installing/) for Hugo installation instructions. Make sure to install the Hugo extended version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](netlify.toml#L10) file. -To run the website locally when you have Hugo installed: +Before building the site, clone the Kubernetes website repository: ```bash git clone https://github.com/kubernetes/website.git cd website -git submodule update --init --recursive +git submodule update --init --recursive --depth 1 +``` + +**Note:** The Kubernetes website deploys the [Docsy Hugo theme](https://github.com/google/docsy#readme). +If you have not updated your website repository, the `website/themes/docsy` directory is empty. The site cannot build +without a local copy of the theme. + +Update the website theme: + +```bash +git submodule update --init --recursive --depth 1 +``` + +To build and test the site locally, run: + +```bash hugo server --buildFuture ``` From 1739ac97c1bb54d907d81f7a4810ee81a45d526a Mon Sep 17 00:00:00 2001 From: Karen Bradshaw Date: Wed, 1 Jul 2020 10:42:44 -0400 Subject: [PATCH 2/2] update open-new-pr, docsy info --- .../docs/contribute/new-content/open-a-pr.md | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/content/en/docs/contribute/new-content/open-a-pr.md b/content/en/docs/contribute/new-content/open-a-pr.md index 5b2642dd39..0d4e438321 100644 --- a/content/en/docs/contribute/new-content/open-a-pr.md +++ b/content/en/docs/contribute/new-content/open-a-pr.md @@ -97,10 +97,12 @@ Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installi ### Create a local clone and set the upstream -3. In a terminal window, clone your fork: +3. In a terminal window, clone your fork and update the [Docsy Hugo theme](https://github.com/google/docsy#readme): ```bash git clone git@github.com//website + cd website + git submodule update --init --recursive --depth 1 ``` 4. Navigate to the new `website` directory. Set the `kubernetes/website` repository as the `upstream` remote: @@ -261,18 +263,26 @@ The commands below use Docker as default container engine. Set the `CONTAINER_EN Alternately, install and use the `hugo` command on your computer: -5. Install the [Hugo](https://gohugo.io/getting-started/installing/) version specified in [`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/master/netlify.toml). +1. Install the [Hugo](https://gohugo.io/getting-started/installing/) version specified in [`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/master/netlify.toml). -6. In a terminal, go to your Kubernetes website repository and start the Hugo server: +2. If you have not updated your website repository, the `website/themes/docsy` directory is empty. + The site cannot build without a local copy of the theme. To update the website theme, run: + + ```bash + git submodule update --init --recursive --depth 1 + ``` + +3. In a terminal, go to your Kubernetes website repository and start the Hugo server: ```bash cd /website - hugo server + hugo server --buildFuture ``` -7. In your browser’s address bar, enter `https://localhost:1313`. +4. In a web browser, navigate to `https://localhost:1313`. Hugo watches the + changes and rebuilds the site as needed. -8. To stop the local Hugo instance, go back to the terminal and type `Ctrl+C`, +5. To stop the local Hugo instance, go back to the terminal and type `Ctrl+C`, or close the terminal window. {{% /tab %}}