Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Docsy #3382

Closed
wants to merge 14 commits into from
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/kubernetes_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ List of items to do for upgrading to {version_1} {version_2} {version_3}
- [ ] Regenerate Kubernetes resource includes (e.g. ObjectMeta, PodTemplateSpec)
- [ ] Start a cluster with `make gcloud-test-cluster` (this cluster will use Kubernetes {version_2}), uninstall agones using `helm uninstall agones -n agones-system`, and then run `make gen-embedded-openapi` and `make gen-install`
- [ ] Update documentation for creating clusters and k8s API references to align with the above clusters versions and the k8s API version
- [ ] `site/config.toml`
- [ ] `site/hugo.toml`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this value in the hugo.toml? Looks like it's still in config.toml?

- [ ] `dev_supported_k8s`, which are {version_1} {version_2} {version_3}
- [ ] `dev_k8s_api_version`, which is {version_2}
- [ ] `dev_gke_example_cluster_version`, which is {version_2}
Expand Down
4 changes: 2 additions & 2 deletions build/includes/website.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ site-static: ensure-build-image
docker run --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) $(build_tag) \
bash -c "npm list autoprefixer || npm install [email protected]"
docker run --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) $(build_tag) bash -c \
"git config --global --add safe.directory /go/src/agones.dev/agones && $(ENV) hugo --config=config.toml $(ARGS)"
"git config --global --add safe.directory /go/src/agones.dev/agones && $(ENV) hugo --config=hugo.toml $(ARGS)"

site-gen-app-yaml: SERVICE ?= default
site-gen-app-yaml:
Expand Down Expand Up @@ -128,7 +128,7 @@ del-data-proofer-ignore: ensure-build-image
docker run --rm $(common_mounts) --workdir=$(mount_path) $(DOCKER_RUN_ARGS) $(build_tag) \
go run build/scripts/remove-data-proofer-ignore/main.go -file=$(FILENAME)

# update release version and replicate data between dev and prod in site/config.toml
# update release version and replicate data between dev and prod in site/hugo.toml
site-config-update-version: ensure-build-image
docker run --rm $(common_mounts) --workdir=$(mount_path) $(DOCKER_RUN_ARGS) $(build_tag) \
go run build/scripts/site-config-update-version/main.go
Expand Down
8 changes: 4 additions & 4 deletions build/scripts/site-config-update-version/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package main implements a program that updates the release version and sync data between dev and prod in site/config.toml file.
// Package main implements a program that updates the release version and sync data between dev and prod in site/hugo.toml file.
package main

import (
Expand Down Expand Up @@ -48,8 +48,8 @@ type Config struct {
}

func main() {
// Read the content of the config.toml file
configFile := "site/config.toml"
// Read the content of the hugo.toml file
configFile := "site/hugo.toml"
content, err := os.ReadFile(configFile)
if err != nil {
log.Println("Read File: ", err)
Expand Down Expand Up @@ -93,7 +93,7 @@ func main() {
// Update release_branch and release_version values
updatedLines := updateReleaseValues(lines)

// Write the updated lines back to the config.toml file
// Write the updated lines back to the hugo.toml file
err = writeLinesToFile(configFile, updatedLines)
if err != nil {
log.Println("Write File: ", err)
Expand Down
2 changes: 1 addition & 1 deletion docs/governance/templates/release_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ and copy it into a release issue. Fill in relevant values, found inside {}
- [ ] Run `make del-data-proofer-ignore FILENAME={version}-1.md` to remove `data-proofer-ignore` attribute from previous release blog. Review all occurrences of the link_test and data-proofer-ignore attributes globally. Exclude html and release files.
- [ ] Run `make feature-shortcode-update version={version}` to remove all instances of the `feature expiryVersion` shortcode, including the associated content, while preserving the rest of the content within the .md files located in site/content/en/docs. Additionally, ensure that only the block of `feature publishVersion` is removed without affecting the content.
- [ ] Add a link to previous version's documentation to nav dropdown in `site/layouts/partials/navbar.html` on top and Run `make update-navbar-version FILENAME=site/layouts/partials/navbar.html` to remove the older version from the dropdown list.
- [ ] config.toml updates:
- [ ] hugo.toml updates:
- [ ] Run `make site-config-update-version` to update the release version and sync data between dev and prod.
- [ ] Update documentation with updated example images tags.
- [ ] Create PR with these changes, and merge them with an approval.
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Contribute/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ candidate release date - or whichever release is most relevant.
### Within a Page

We have a `feature` shortcode that can be used to show, or hide sections of pages based on the current semantic version
(set in config.toml, and overwritable by env variable).
(set in hugo.toml, and overwritable by env variable).

For example, to show a section only from 1.24.0 forwards:

Expand Down
2 changes: 2 additions & 0 deletions site/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ module github.com/agones/agones/site
go 1.20
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apache header please.


require gopkg.in/yaml.v2 v2.2.8
markmandel marked this conversation as resolved.
Show resolved Hide resolved

require github.com/google/docsy v0.7.1 // indirect
5 changes: 5 additions & 0 deletions site/go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY=
github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc=
github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
Expand Down
2 changes: 1 addition & 1 deletion site/config.toml → site/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ title = "Agones"
enableRobotsTXT = true

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we delete the layouts/docsy folder as well?


# Will give values to .Lastmod etc.
enableGitInfo = true
Expand Down