mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-11-30 23:16:04 +07:00
update to latest hugo, obtain hugo using go instead of docker
This commit is contained in:
@@ -5,7 +5,7 @@ publish = "site/public/"
|
|||||||
command = "hugo"
|
command = "hugo"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.60.0"
|
HUGO_VERSION = "0.111.3"
|
||||||
|
|
||||||
[context.production.environment]
|
[context.production.environment]
|
||||||
# this controls our robots.txt
|
# this controls our robots.txt
|
||||||
|
|||||||
@@ -1,14 +1,37 @@
|
|||||||
|
REPO_ROOT:=${CURDIR}/..
|
||||||
|
# setup go for managing hugo
|
||||||
|
PATH:=$(shell cd $(REPO_ROOT) && . hack/build/setup-go.sh && echo "$${PATH}")
|
||||||
|
# go1.9+ can autodetect GOROOT, but if some other tool sets it ...
|
||||||
|
GOROOT:=
|
||||||
|
# enable modules
|
||||||
|
GO111MODULE=on
|
||||||
|
# disable CGO by default for static binaries
|
||||||
|
CGO_ENABLED=0
|
||||||
|
export PATH GOROOT GO111MODULE CGO_ENABLED
|
||||||
|
# work around broken PATH export
|
||||||
|
SPACE:=$(subst ,, )
|
||||||
|
SHELL:=env PATH=$(subst $(SPACE),\$(SPACE),$(PATH)) $(SHELL)
|
||||||
|
|
||||||
# from https://github.com/kubernetes/website/blob/master/Makefile
|
# from https://github.com/kubernetes/website/blob/master/Makefile
|
||||||
DOCKER = docker
|
DOCKER = docker
|
||||||
HUGO_VERSION = 0.60.0
|
HUGO_VERSION = 0.60.0
|
||||||
DOCKER_IMAGE = jojomi/hugo:$(HUGO_VERSION)
|
DOCKER_IMAGE = jojomi/hugo:$(HUGO_VERSION)
|
||||||
DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(realpath $(CURDIR)/..):/src -p 1313:1313 --workdir /src/site --entrypoint=hugo --platform linux/amd64 $(DOCKER_IMAGE)
|
DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(realpath $(CURDIR)/..):/src -p 1313:1313 --workdir /src/site --entrypoint=hugo --platform linux/amd64 $(DOCKER_IMAGE)
|
||||||
|
|
||||||
serve:
|
HUGO_BIN:=$(REPO_ROOT)/bin/hugo
|
||||||
$(DOCKER_RUN) server --bind="0.0.0.0" \
|
|
||||||
|
$(HUGO_BIN):
|
||||||
|
go build -o $(HUGO_BIN) github.com/gohugoio/hugo
|
||||||
|
|
||||||
|
hugo: $(HUGO_BIN)
|
||||||
|
|
||||||
|
serve: hugo
|
||||||
|
$(HUGO_BIN) server --bind="0.0.0.0" \
|
||||||
--ignoreCache \
|
--ignoreCache \
|
||||||
--buildFuture \
|
--buildFuture \
|
||||||
--disableFastRender
|
--disableFastRender
|
||||||
|
|
||||||
build:
|
build: hugo
|
||||||
$(DOCKER_RUN)
|
$(HUGO_BIN)
|
||||||
|
|
||||||
|
.PHONY: build serve hugo
|
||||||
|
|||||||
@@ -100,8 +100,10 @@ Lints include:
|
|||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Our docs are built with [hugo] just like [kubernetes.io](https://kubernetes.io).
|
Our docs are built with [hugo] just like [kubernetes.io](https://kubernetes.io).
|
||||||
We provide a makefile for development that uses hugo in docker so you don't need
|
|
||||||
to install anything further, just [install docker](#install-docker).
|
We provide a Makefile for development that automatically manages a go toolchain
|
||||||
|
and uses that to build and run hugo. You only need `make`, `bash`,
|
||||||
|
and `curl` or `wget` installed.
|
||||||
|
|
||||||
Markdown content is under `site/content/` with a structure mirroring this site.
|
Markdown content is under `site/content/` with a structure mirroring this site.
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@ your pull request on GitHub.
|
|||||||
|
|
||||||
These are also predictable as `https://deploy-preview-$PR_NUMBER--k8s-kind.netlify.app/`, just replace `$PR_NUMBER` with the number of your Pull Request.
|
These are also predictable as `https://deploy-preview-$PR_NUMBER--k8s-kind.netlify.app/`, just replace `$PR_NUMBER` with the number of your Pull Request.
|
||||||
|
|
||||||
For more involved site / documentation development, you can run `make -C site serve` from the kind repo to run a local instance of the documentation, browsable at [http://localhost:1313](http://localhost:1313). As mentioned previously, do this you'll need to [install docker](#install-docker).
|
For more involved site / documentation development, you can run `make -C site serve` from the kind repo to run a local instance of the documentation, browsable at [http://localhost:1313](http://localhost:1313).
|
||||||
|
|
||||||
This site has a custom hugo theme under `site/layouts` & `site/assets`. It's
|
This site has a custom hugo theme under `site/layouts` & `site/assets`. It's
|
||||||
mostly relatively simple but it has a few extra features:
|
mostly relatively simple but it has a few extra features:
|
||||||
|
|||||||
127
site/go.mod
Normal file
127
site/go.mod
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
module sigs.k8s.io/kind/site
|
||||||
|
|
||||||
|
go 1.18
|
||||||
|
|
||||||
|
require github.com/gohugoio/hugo v0.111.3
|
||||||
|
|
||||||
|
require (
|
||||||
|
cloud.google.com/go v0.101.0 // indirect
|
||||||
|
cloud.google.com/go/compute v1.6.1 // indirect
|
||||||
|
cloud.google.com/go/iam v0.3.0 // indirect
|
||||||
|
cloud.google.com/go/storage v1.22.0 // indirect
|
||||||
|
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
|
||||||
|
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
|
||||||
|
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
||||||
|
github.com/Azure/go-autorest/autorest v0.11.20 // indirect
|
||||||
|
github.com/Azure/go-autorest/autorest/adal v0.9.15 // indirect
|
||||||
|
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
|
||||||
|
github.com/Azure/go-autorest/logger v0.2.1 // indirect
|
||||||
|
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
|
||||||
|
github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 // indirect
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||||
|
github.com/alecthomas/chroma/v2 v2.5.0 // indirect
|
||||||
|
github.com/armon/go-radix v1.0.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go v1.43.5 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2 v1.9.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/config v1.7.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/credentials v1.4.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.2 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/sso v1.4.0 // indirect
|
||||||
|
github.com/aws/aws-sdk-go-v2/service/sts v1.7.0 // indirect
|
||||||
|
github.com/aws/smithy-go v1.8.0 // indirect
|
||||||
|
github.com/bep/clock v0.3.0 // indirect
|
||||||
|
github.com/bep/debounce v1.2.0 // indirect
|
||||||
|
github.com/bep/gitmap v1.1.2 // indirect
|
||||||
|
github.com/bep/goat v0.5.0 // indirect
|
||||||
|
github.com/bep/godartsass v0.16.0 // indirect
|
||||||
|
github.com/bep/golibsass v1.1.0 // indirect
|
||||||
|
github.com/bep/gowebp v0.2.0 // indirect
|
||||||
|
github.com/bep/lazycache v0.2.0 // indirect
|
||||||
|
github.com/bep/overlayfs v0.6.0 // indirect
|
||||||
|
github.com/bep/tmc v0.5.1 // indirect
|
||||||
|
github.com/clbanning/mxj/v2 v2.5.7 // indirect
|
||||||
|
github.com/cli/safeexec v1.0.0 // indirect
|
||||||
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||||
|
github.com/disintegration/gift v1.2.1 // indirect
|
||||||
|
github.com/dlclark/regexp2 v1.7.0 // indirect
|
||||||
|
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||||
|
github.com/evanw/esbuild v0.17.0 // indirect
|
||||||
|
github.com/frankban/quicktest v1.14.4 // indirect
|
||||||
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
|
github.com/getkin/kin-openapi v0.110.0 // indirect
|
||||||
|
github.com/ghodss/yaml v1.0.0 // indirect
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||||
|
github.com/go-openapi/swag v0.19.5 // indirect
|
||||||
|
github.com/gobuffalo/flect v0.3.0 // indirect
|
||||||
|
github.com/gobwas/glob v0.2.3 // indirect
|
||||||
|
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20210430103248-4c28c89f8013 // indirect
|
||||||
|
github.com/gohugoio/locales v0.14.0 // indirect
|
||||||
|
github.com/gohugoio/localescompressed v1.0.1 // indirect
|
||||||
|
github.com/golang-jwt/jwt/v4 v4.0.0 // indirect
|
||||||
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
|
github.com/google/wire v0.5.0 // indirect
|
||||||
|
github.com/googleapis/gax-go/v2 v2.3.0 // indirect
|
||||||
|
github.com/googleapis/go-type-adapters v1.0.0 // indirect
|
||||||
|
github.com/gorilla/websocket v1.5.0 // indirect
|
||||||
|
github.com/hairyhenderson/go-codeowners v0.2.3-0.20201026200250-cdc7c0759690 // indirect
|
||||||
|
github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
|
||||||
|
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||||
|
github.com/invopop/yaml v0.1.0 // indirect
|
||||||
|
github.com/jdkato/prose v1.2.1 // indirect
|
||||||
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||||
|
github.com/kr/pretty v0.3.1 // indirect
|
||||||
|
github.com/kr/text v0.2.0 // indirect
|
||||||
|
github.com/kyokomi/emoji/v2 v2.2.11 // indirect
|
||||||
|
github.com/magefile/mage v1.14.0 // indirect
|
||||||
|
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
|
||||||
|
github.com/marekm4/color-extractor v1.2.0 // indirect
|
||||||
|
github.com/mattn/go-ieproxy v0.0.1 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||||
|
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||||
|
github.com/mitchellh/hashstructure v1.1.0 // indirect
|
||||||
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
|
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||||
|
github.com/muesli/smartcrop v0.3.0 // indirect
|
||||||
|
github.com/niklasfasching/go-org v1.6.6 // indirect
|
||||||
|
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||||
|
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||||
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
|
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
|
||||||
|
github.com/sanity-io/litter v1.5.5 // indirect
|
||||||
|
github.com/spf13/afero v1.9.3 // indirect
|
||||||
|
github.com/spf13/cast v1.5.0 // indirect
|
||||||
|
github.com/spf13/cobra v1.6.1 // indirect
|
||||||
|
github.com/spf13/fsync v0.9.0 // indirect
|
||||||
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
github.com/tdewolff/minify/v2 v2.12.4 // indirect
|
||||||
|
github.com/tdewolff/parse/v2 v2.6.5 // indirect
|
||||||
|
github.com/yuin/goldmark v1.5.4 // indirect
|
||||||
|
go.opencensus.io v0.24.0 // indirect
|
||||||
|
go.uber.org/atomic v1.10.0 // indirect
|
||||||
|
gocloud.dev v0.24.0 // indirect
|
||||||
|
golang.org/x/crypto v0.3.0 // indirect
|
||||||
|
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect
|
||||||
|
golang.org/x/image v0.5.0 // indirect
|
||||||
|
golang.org/x/net v0.7.0 // indirect
|
||||||
|
golang.org/x/oauth2 v0.2.0 // indirect
|
||||||
|
golang.org/x/sync v0.1.0 // indirect
|
||||||
|
golang.org/x/sys v0.5.0 // indirect
|
||||||
|
golang.org/x/text v0.7.0 // indirect
|
||||||
|
golang.org/x/tools v0.4.0 // indirect
|
||||||
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||||
|
google.golang.org/api v0.76.0 // indirect
|
||||||
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
|
google.golang.org/genproto v0.0.0-20220426171045-31bebdecfb46 // indirect
|
||||||
|
google.golang.org/grpc v1.46.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
)
|
||||||
1070
site/go.sum
Normal file
1070
site/go.sum
Normal file
File diff suppressed because it is too large
Load Diff
13
site/tools.go
Normal file
13
site/tools.go
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
//go:build tools
|
||||||
|
// +build tools
|
||||||
|
|
||||||
|
/*
|
||||||
|
Package site is used to track binary dependencies with go modules
|
||||||
|
https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
|
||||||
|
Namely: hugo
|
||||||
|
*/
|
||||||
|
package site
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "github.com/gohugoio/hugo"
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user