From 9568a05089354b66dc5291c30e52f349c1cb9233 Mon Sep 17 00:00:00 2001 From: lucperkins Date: Fri, 10 Aug 2018 16:53:42 +0200 Subject: [PATCH 1/3] Modify README to provide more in-depth instructions on Hugo --- Makefile | 2 +- README.md | 47 ++++++++++++++++++++++------------------------- netlify.toml | 2 +- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 9318b4ee4f9..6ae092fc6be 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ DOCKER = docker -HUGO_VERSION = 0.44 +HUGO_VERSION = 0.47.1 DOCKER_IMAGE = kubernetes-hugo DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(PWD):/src diff --git a/README.md b/README.md index e4417cf657f..3a859cc9ccd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -## Instructions for Contributing to the Kubernetes Documentation +## The Kubernetes documentation -Welcome! We are very pleased you want to contribute to the Kubernetes documentation. +Welcome! This repository houses all of the assets required to build the Kubernetes website and documentation. We're very pleased that you want to contribute! -You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account called a *fork*. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it. +## Contributing to the docs + +You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a *fork*. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it. Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.** Also note that you may end up having more than one Kubernetes reviewer provide you feedback or you may end up getting feedback from a Kubernetes reviewer that is different than the one originally assigned to provide you feedback. Furthermore, in some cases, one of your reviewers might ask for a technical review from a [Kubernetes tech reviewer](https://github.com/kubernetes/website/wiki/Tech-reviewers) when needed. Reviewers will do their best to provide feedback in a timely fashion but response time can vary based on circumstances. @@ -13,41 +15,36 @@ For more information about contributing to the Kubernetes documentation, see: * [Using Page Templates](http://kubernetes.io/docs/contribute/style/page-templates/) * [Documentation Style Guide](http://kubernetes.io/docs/contribute/style/style-guide/) +## Running the site locally using Hugo + +The Kubernetes documentation is built using the [Hugo](https://gohugo.io) static site generator. See the [official Hugo documentation](https://gohugo.io/getting-started/installing/) for Hugo installation instructions. + +> Building and running the site requires the Hugo version specified by the `HUGO_VERSION` environment variable in the [`netlify.toml`](/blob/master/netlify.toml#L9) file. + +To run the site locally when you have Hugo installed: + +```bash +make serve +``` + +This will start the local Hugo server on port 1313. Open up your browser to http://localhost:1313 to view the site. As you make changes to the source files, Hugo updates immediately and forces a browser refresh. + ## Building the site using Docker -If you'd like, you can build the Kubernetes docs using Docker. To get started, build the image locally: +You can build the Kubernetes docs using [Docker](https://docker.com). To get started, make sure that you have Docker running and build the image locally: ```bash make docker-image - -# The underlying command: -docker build . \ - --tag kubernetes-hugo \ - --build-arg HUGO_VERSION=0.40.3 ``` -You can create an image for a different version of Hugo by changing the value of the `HUGO_VERSION` argument for the build. You *must* specify a version or the image will not build. Once the `kubernetes-hugo` image has been built locally, you can build the site: ```bash make docker-serve - -# The underlying command: -docker run \ - --rm \ - --interactive \ - --tty \ - --volume $(PWD):/src \ - -p 1313:1313 \ - kubernetes-hugo \ - hugo server \ - --watch \ - --bind 0.0.0.0 ``` -As when building without using a Docker container, the results of the build will be published to the `public` directory (the default output directory for [Hugo](https://gohugo.io), the static site generator used to build this site). +As when building without using a Docker container, the results of the build will be published to the `public` directory (the default output directory for Hugo). ## Thank you! -Kubernetes thrives on community participation, and we really appreciate your -contributions to our site and our documentation! +Kubernetes thrives on community participation, and we really appreciate your contributions to our site and our documentation! diff --git a/netlify.toml b/netlify.toml index cfcfc266850..3aee9b5327f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -6,7 +6,7 @@ publish = "public" command = "hugo --enableGitInfo && cp netlify_noindex_headers.txt public/_headers" [build.environment] -HUGO_VERSION = "0.46" +HUGO_VERSION = "0.47.1" [context.production.environment] HUGO_BASEURL = "https://kubernetes.io/" From bbb321b1f5ecea43180dec6c47074670140a9d82 Mon Sep 17 00:00:00 2001 From: lucperkins Date: Tue, 21 Aug 2018 11:10:06 -0700 Subject: [PATCH 2/3] Change opening header to h1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a8e75158801..39e0da66dbe 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## The Kubernetes documentation +# The Kubernetes documentation Welcome! This repository houses all of the assets required to build the Kubernetes website and documentation. We're very pleased that you want to contribute! From 5d48c500a20c87eacb819af0147891523cf0589d Mon Sep 17 00:00:00 2001 From: lucperkins Date: Thu, 23 Aug 2018 11:40:11 -0700 Subject: [PATCH 3/3] Adjust wording --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39e0da66dbe..0fce14dd3d2 100644 --- a/README.md +++ b/README.md @@ -37,13 +37,13 @@ You can build the Kubernetes docs using [Docker](https://docker.com). To get sta make docker-image ``` -Once the `kubernetes-hugo` image has been built locally, you can build the site: +Once the `kubernetes-hugo` image has been built locally, you can run the site locally: ```bash make docker-serve ``` -As when building without using a Docker container, the results of the build will be published to the `public` directory (the default output directory for Hugo). +Open up your browser to http://localhost:1313 to view the site. ## Thank you!