Skip to content

Commit

Permalink
Modify README to provide more in-depth instructions on Hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed Aug 20, 2018
1 parent 15c9dfb commit 9568a05
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
47 changes: 22 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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!
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

0 comments on commit 9568a05

Please sign in to comment.