Skip to content

Commit

Permalink
docs(infra): Upgrade Docsy and Hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeeu committed Sep 7, 2023
1 parent 92d63cd commit 0a567df
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 293 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/google/docsy.git
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title = "Spinnaker"
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"]

# Will give values to .Lastmod etc.
enableGitInfo = true
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/spinnaker/spinnaker.io

go 1.19

require github.com/google/docsy v0.7.1 // indirect
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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=
72 changes: 0 additions & 72 deletions layouts/partials/footer.html

This file was deleted.

35 changes: 0 additions & 35 deletions layouts/partials/head.html

This file was deleted.

173 changes: 38 additions & 135 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,161 +1,64 @@
# Hugo build configuration for Netlify
# (https://gohugo.io/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify)
# Default build settings
[build]
publish = "public"
command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --minify"
command = "hugo --gc"
functions = "./functions"

[context.production.environment]
HUGO_VERSION = "0.74.2"
HUGO_ENV = "production"
GO_VERSION = "1.18"
HUGO_VERSION = "0.110.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"

[context.split1]
command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --minify --enableGitInfo"
command = "hugo --gc --minify"

[context.split1.environment]
HUGO_VERSION = "0.74.2"
GO_VERSION = "1.18"
HUGO_VERSION = "0.110.0"
HUGO_ENV = "production"

[context.deploy-preview]
command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --minify --buildFuture -b $DEPLOY_PRIME_URL"
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.74.2"
GO_VERSION = "1.18"
HUGO_VERSION = "0.110.0"

[context.branch-deploy]
command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --minify -b $DEPLOY_PRIME_URL"
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy.environment]
HUGO_VERSION = "0.74.2"
GO_VERSION = "1.18"
HUGO_VERSION = "0.110.0"

[context.next.environment]
HUGO_ENABLEGITINFO = "true"

[[redirects]]
from = "/setup/productionize/*"
to = "/docs/setup/productionize/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/install/*"
to = "/docs/setup/install/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/artifacts/*"
to = "/docs/setup/other_config/artifacts/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/bakery/*"
to = "/docs/setup/other_config/bakery/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/security/*"
to = "/docs/setup/other_config/security/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/triggers/*"
to = "/docs/setup/other_config/triggers/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/triggers/*"
to = "/docs/setup/other_config/triggers/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/spin/*"
to = "/docs/setup/other_config/spin/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/ci/*"
to = "/docs/setup/other_config/ci/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/monitoring/*"
to = "/docs/setup/other_config/monitoring/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/ci/*"
to = "/docs/setup/other_config/ci/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/canary/*"
to = "/docs/setup/other_config/canary/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/features/*"
to = "/docs/setup/other_config/features/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/configuration/*"
to = "/docs/setup/other_config/configuration/:splat"
status = 301
force = false

[[redirects]]
from = "/setup/quickstart/*"
to = "/docs/setup/install/:splat"
status = 301
force = false

[[redirects]]
from = "/guides/*"
to = "/docs/guides/:splat"
status = 301
force = false

[[redirects]]
from = "/reference/*"
to = "/docs/reference/:splat"
status = 301
force = false

[[redirects]]
from = "/community/releases/*"
to = "/docs/releases/:splat"
status = 301
force = false

[[redirects]]
from = "/community/*"
to = "/docs/community/:splat"
status = 301
force = false

[[redirects]]
from = "/docs/reference/artifacts/*"
to = "/docs/reference/artifacts-legacy/:splat"
status = 301
force = false

[[redirects]]
from = "/docs/reference/artifacts-with-artifactsrewrite/*"
to = "/docs/reference/ref-artifacts/:splat"
status = 301
force = false

# https://github.com/netlify-labs/netlify-plugin-sitemap
[[plugins]]
package = "@netlify/plugin-sitemap"

[plugins.inputs]
buildDir = "public"
exclude =[
'./public/includes/',
'./public/categories/',
'./public/tags/',
'./public/favicons/',
'./public/404.html'
]
# set baseURL because we aren't configuring a custom domain in Netlify
# Although the above is called base URL this actually ends up being the hostname in the sitemap and as such trying to use a URL like http://example.com/en/ will results in http://example.com/
# https://github.com/netlify-labs/netlify-plugin-sitemap
baseUrl = "https://spinnaker.io/"

# append missing trailing slash to prettyURL
trailingSlash = true
changeFreq = "daily"
priority = 0.5

# headers https://docs.netlify.com/routing/headers/#syntax-for-the-headers-file
# https://cloud-armory.slack.com/archives/CH4RVCCTS/p1608572781420500
Expand Down
42 changes: 0 additions & 42 deletions static/js/mermaid.min.js

This file was deleted.

1 change: 0 additions & 1 deletion themes/docsy
Submodule docsy deleted from 25f733

0 comments on commit 0a567df

Please sign in to comment.