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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
13 changes: 13 additions & 0 deletions site/assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,16 @@ input[type="search"]::placeholder {
.showcase img {
margin: 0 30px;
}

.td-search__icon {
color: #9B9595 !important;
}

.search-bar {
width: 300px;
height: 40px;
}

.nav-link {
margin-right: 20px !important;
}
21 changes: 12 additions & 9 deletions site/content/en/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,31 @@
{{< /blocks/cover >}}

{{% blocks/lead color="secondary" %}}
<strong>What is Agones?</strong>
<p><strong>What is Agones?</strong></p>

An open source, batteries-included, multiplayer dedicated game server scaling and
orchestration platform that can run anywhere <a class="text-primary" href="https://kubernetes.io">Kubernetes</a> can run.
<p>An open source, batteries-included, multiplayer dedicated game server scaling and
orchestration platform that can run anywhere <a class="text-primary" href="https://kubernetes.io">Kubernetes</a> can run.</p>
{{% /blocks/lead %}}

{{< blocks/section color="dark" >}}
<div style="display: flex; justify-content: space-around; gap: 4%;">
{{% blocks/feature icon="fas fa-file-code" title="Orchestrate Game Servers" url="./docs/getting-started/" %}}
Define and manage groups of ready gameservers through YAML configuration or API calls.
<p>Define and manage groups of ready gameservers through YAML configuration or API calls.</p>
{{% /blocks/feature %}}

{{% blocks/feature icon="fas fa-wrench" title="Integrate any Engine" url="./docs/guides/client-sdks/" %}}
Integrated SDK for managing game server lifecycle, health and configuration.
<p>Integrated SDK for managing game server lifecycle, health and configuration.

Tools for local development included!
Tools for local development included!</p>
{{% /blocks/feature %}}


{{% blocks/feature icon="fas fa-chart-area" title="Metrics and Monitoring" url="./docs/guides/metrics/" %}}
Integration with [OpenCensus](https://opencensus.io/)
for platform-independent game server metrics and monitoring dashboards
<p>Integration with [OpenCensus](https://opencensus.io/)
for platform-independent game server metrics and monitoring dashboards</p>
{{% /blocks/feature %}}


</div>
{{< /blocks/section >}}

{{< blocks/section color="primary" >}}
Expand All @@ -70,6 +71,7 @@ <h2 class="text-center pb-3">Companies using Agones</h2>
{{< /blocks/section >}}

{{< blocks/section color="secondary" >}}
<div style="display: flex; justify-content: space-around;">
{{% blocks/feature icon="fab fa-slack" title="Join us on Slack" url="https://join.slack.com/t/agones/shared_invite/enQtMzE5NTE0NzkyOTk1LWU3ODAyZjdjMjNlYWIxZTAwODkxMGY3YWEyZjNjMjc4YWM1Zjk0OThlMGU2ZmUyMzRlMDljNDJiNmZlMGQ1M2U" url_text="Join us" %}}
Join the community on Slack
{{% /blocks/feature %}}
Expand All @@ -85,5 +87,6 @@ <h2 class="text-center pb-3">Companies using Agones</h2>
For announcement of latest features etc.
{{% /blocks/feature %}}

</div>
{{< /blocks/section >}}

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
4 changes: 2 additions & 2 deletions site/config.toml → site/hugo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Google LLC All Rights Reserved.
# Copyright 2023 Google LLC All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -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
6 changes: 3 additions & 3 deletions site/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }} {{ end }}<span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
</a>

<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<div class="td-navbar-nav-scroll ms-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
{{ $p := . }}
{{ range .Site.Menus.main }}
Expand All @@ -14,14 +14,14 @@
{{ with .Page }}
{{ $active = or $active ( $.IsDescendant .) }}
{{ end }}
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" style="margin-right: 15px;"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
</li>
{{ end }}
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="{{ .Site.Params.github_repo }}">GitHub</a>
</li>
<li class="nav-item dropdown d-none d-lg-block">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Release
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
Expand Down
11 changes: 8 additions & 3 deletions site/layouts/partials/search-input.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{ with .Site.Params.gcs_engine_id }}
<input id="agones-search" type="search" class="form-control td-search-input" placeholder="&#xf002 {{ T "ui_search" }}" aria-label="{{ T "ui_search" }}" autocomplete="off">
{{ end }}
{{ if .Site.Params.gcs_engine_id -}}

<div class="td-search">
<div class="td-search__icon"></div>
<input id="agones-search" type="search" class="td-search__input form-control td-search-input" placeholder="{{ T "ui_search" }}" aria-label="{{ T "ui_search" }}" autocomplete="off">
</div>

{{- end -}}
16 changes: 8 additions & 8 deletions site/layouts/shortcodes/blocks/cover.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
<section class="row td-cover-block td-cover-block--height-{{ $height }} js-td-cover td-overlay td-overlay--light -bg-{{ $col_id }}">
<div class="container td-overlay__inner">
<div class="row align-items-end">
<div class="col-lg-6">
<h1 class="display-1 mt-0 pb-3">
<div class="col-lg-4 mt-1 mb-2 mb-lg-0 ms-md-auto" style="padding-left: 1px; width: 500px;">
<div class="mb-4 h1">
<img alt="agones" width="98" src="images/logo.svg" />
Agones
</h1>
<p class="display-2 mb-0">Host, Run and Scale dedicated game servers on Kubernetes</p>
<strong style="font-weight: 500; font-size: 48px;">Agones</strong>
</div>
<h2 class="h2"><strong style="font-weight: 300; font-size: 38px;">Host, Run and Scale dedicated game servers on Kubernetes</strong></h2>
</div>
<div class="col-lg-6 mt-5 mt-lg-3 d-sm-block" style="display: none">
<div class="col-lg-6 mt-1 mt-lg-3 d-sm-block" style="display: none">
<asciinema-player
loop autoplay font-size="12px" rows=12 cols=60
src="agones.cast"></asciinema-player>
</div>
<div class="col-12 pt-3">
<div class="pt-3 lead text-center">
{{ .Inner }}
</div>
</div>
</div>
</div>
</div>
</section>
</section>
9 changes: 0 additions & 9 deletions site/themes/docsy/.gitignore

This file was deleted.

34 changes: 0 additions & 34 deletions site/themes/docsy/CONTRIBUTING.md

This file was deleted.

Loading