未验证 提交 74a060a0 编写于 作者: T Thomas Strömberg 提交者: GitHub

Merge pull request #5070 from tstromberg/pre-doc-bash

Add documentation & make targets for starting a local doc site
......@@ -44,3 +44,9 @@ deploy/iso/minikube-iso/board/coreos/minikube/rootfs-overlay/etc/VERSION
/.vscode
test/integration/testdata/minikube-linux-amd64-latest-stable
# hugo
/public
/site/resources
/_gen
......@@ -493,3 +493,21 @@ install-kvm-driver: out/docker-machine-driver-kvm2
release-kvm-driver: install-kvm-driver checksum
gsutil cp $(GOBIN)/docker-machine-driver-kvm2 gs://minikube/drivers/kvm/$(VERSION)/
gsutil cp $(GOBIN)/docker-machine-driver-kvm2.sha256 gs://minikube/drivers/kvm/$(VERSION)/
site/themes/docsy/assets/vendor/bootstrap/package.js:
git submodule update -f --init --recursive
# hugo for generating site previews
out/hugo/hugo:
mkdir -p out
test -d out/hugo || git clone https://github.com/gohugoio/hugo.git out/hugo
(cd out/hugo && go build --tags extended)
# Serve the documentation site to localhost
.PHONY: site
site: site/themes/docsy/assets/vendor/bootstrap/package.js out/hugo/hugo
(cd site && ../out/hugo/hugo serve \
--disableFastRender \
--navigateToChanged \
--ignoreCache \
--buildFuture)
---
linkTitle: "Documentation"
title: "Contributing to minikube documentation"
date: 2019-07-31
weight: 2
---
minikube's documentation is in [Markdown](https://www.markdownguide.org/cheat-sheet/), and generated using the following tools:
* [Hugo](https://gohugo.io)
* [Docsy](https://www.docsy.dev)
In production, the minikube website is served using [Netlify](http://netlify.com/)
## Local documentation website
To serve documentation pages locally, clone the `minikube` repository and run:
`make site`
NOTE: On Windows, our site currently causes Hugo to `panic`.
## Lint
We recommend installing [markdownlint](https://github.com/markdownlint/markdownlint) to find issues with your markdown file. Once installed, you can use this handy target:
`make mdlint`
## Style Guidelines
We follow the [Kubernetes Documentation Style Guide](https://kubernetes.io/docs/contribute/style/style-guide/)
## Linking between documents
For compile-time checking of links, use one of the following forms to link between documentation pages:
```go-html-template
{{</* ref "document.md" */>}}
{{</* ref "#anchor" */>}}
{{</* ref "document.md#anchor" */>}}
{{</* ref "/blog/my-post" */>}}
{{</* ref "/blog/my-post.md" */>}}
{{</* relref "document.md" */>}}
{{</* relref "#anchor" */>}}
{{</* relref "document.md#anchor" */>}}
```
For more information, please see [Hugo: Links and Cross References](https://gohugo.io/content-management/cross-references/)
## Pull Request Previews
When reviewing documentation PR's, look for the test that says:
**✓ deploy/netlify** Deploy preview ready! *Details*
The `Details` link will point to a site preview URL in the form of:
<https://deploy-preview-PR#--kubernetes-sigs-minikube.netlify.com>
......@@ -28,7 +28,7 @@ make -s lint-ci && echo ok || ((exitcode += 4))
echo "= boilerplate ==========================================================="
readonly PYTHON=$(type -P python || echo docker run --rm -it -v $(pwd):/minikube -w /minikube python python)
readonly BDIR="./hack/boilerplate"
missing="$($PYTHON ${BDIR}/boilerplate.py --rootdir . --boilerplate-dir ${BDIR} | egrep -v '/assets.go|/translations.go|/site/themes/|/site/node_modules' || true)"
missing="$($PYTHON ${BDIR}/boilerplate.py --rootdir . --boilerplate-dir ${BDIR} | egrep -v '/assets.go|/translations.go|/site/themes/|/site/node_modules|\./out|/hugo/' || true)"
if [[ -n "${missing}" ]]; then
echo "boilerplate missing: $missing"
echo "consider running: ${BDIR}/fix.sh"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册