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 12, 2023
1 parent 7713e9f commit 23cf170
Show file tree
Hide file tree
Showing 15 changed files with 188 additions and 517 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.

242 changes: 108 additions & 134 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,69 @@ 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"]
# Language configuration
[languages]
[languages.en]
title = "Spinnaker"
description = "Spinnaker is an open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence."
languageName ="English"
# Weight used for sorting.
weight = 1

# Docsy is now a Go module. Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]
# Sept 2023 If I don't include module.imports.mounts entries, compilation breaks with a lot of "not found" - can't find shortcodes or refs
[module]
proxy = "direct"

[module.hugoVersion]
extended = true
min = "0.110.0"

[[module.imports]]
path = "github.com/google/docsy"
disable = false

[[module.imports.mounts]]
source = "assets"
target = "assets"

[[module.imports.mounts]]
source = "node_modules/bootstrap"
target = "assets/vendor/bootstrap"

[[module.imports.mounts]]
source = "node_modules/@fortawesome/fontawesome-free"
target = "assets/vendor/Font-Awesome"

[[module.imports.mounts]]
source = "i18n"
target = "i18n"

[[module.imports.mounts]]
source = "layouts"
target = "layouts"

[[module.imports.mounts]]
source = "static"
target = "static"

[[module.imports.mounts]]
source = "data"
target = "data"

[[module.imports.mounts]]
source = "node_modules/@fortawesome/fontawesome-free/webfonts"
target = "static/webfonts"

[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = false

[[module.mounts]]
source = "content/en"
target = "content"
# Will give values to .Lastmod etc.
enableGitInfo = true

Expand All @@ -18,50 +79,16 @@ enableMissingTranslationPlaceholders = true

disableKinds = ["taxonomy", "taxonomyTerm"]

# Highlighting config
# Highlighting config (copied from the docsy example site, tag v0.7.1)
pygmentsCodeFences = true
pygmentsUseClasses = false
# Use the new Chroma Go highlighter in Hugo.
pygmentsUseClassic = false
#pygmentsOptions = "linenos=table"
# See https://help.farbox.com/pygments.html
pygmentsStyle = "tango"

# Configure how URLs look like per section.
[permalinks]
blog = "/:section/:year/:month/:day/:slug/"

## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
# [blackfriday]
# plainIDAnchors = true
# hrefTargetBlank = true
# angledQuotes = false
# latexDashes = true

# Image processing configuration.
[imaging]
resampleFilter = "CatmullRom"
quality = 75
anchor = "smart"

[services]
[services.googleAnalytics]
# Comment out the id to disable the feature described in [params.ui.feedback].
# This ID can be found in Google Analytics -> Admin Panel -> Data Streams -> Spinnaker Website - GA4 -> Measurement ID
id = "G-H0XE7ESBFR"

# Language configuration

[languages]
[languages.en]
title = "Spinnaker"
description = "Multi-cloud continuous delivery for the enterprise"
languageName ="English"
# Weight used for sorting.
weight = 1
pygmentsStyle = "dracula"

[markup]
defaultMarkdownHandler = "goldmark"
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
Expand All @@ -76,30 +103,54 @@ defaultMarkdownHandler = "goldmark"
attribute = true
autoHeadingID = true
autoHeadingIDType = "github"
[markup.highlight]
codeFences = true
guessSyntax = false
hl_Lines = ""
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = true
style = "monokai"
tabWidth = 4
[markup.tableOfContents]
endLevel = 3
ordered = false
startLevel = 2
[markup.highlight]
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
style = "dracula"
# these are defaults https://gohugo.io/getting-started/configuration-markup/#highlight
anchorLineNos = false
codeFences = true
hl_Lines = ''
hl_inline = false
lineAnchors = ''
lineNoStart = 1
lineNos = false
lineNumbersInTable = true
noClasses = true
noHl = false
tabWidth = 4
guessSyntax = true
# Set guessSyntax to true if you want your chosen highlight style used for code blocks without a specified language



# Configure how URLs look like per section.
[permalinks]
blog = "/:section/:year/:month/:day/:slug/"

# Image processing configuration.
[imaging]
resampleFilter = "CatmullRom"
quality = 75
anchor = "smart"

# Google Analytics configuration
# https://gohugo.io/templates/internal/#configure-google-analytics
# https://www.docsy.dev/docs/adding-content/feedback/#adding-analytics
googleAnalytics = "G-H0XE7ESBFR"
# Comment out the next line to disable GA tracking.
# This Tag ID can be found in Google Analytics -> Admin Panel -> Data Streams -> Spinnaker Website - GA4 -> Configure Tag Settings
# google_tag_id="GT-W6BN9SN" this was for a custom fix in the site with the older theme version

# Everything below this are Site Params
[params]
copyright = 'Copyright © 2020 The Linux Foundation®. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage">Trademark Usage</a> page. Linux is a registered trademark of Linus Torvalds.'
privacy_policy = "http://www.linuxfoundation.org/privacy"
terms_of_use = "http://www.linuxfoundation.org/terms"

# Comment out the next line to disable GA tracking.
# This Tag ID can be found in Google Analytics -> Admin Panel -> Data Streams -> Spinnaker Website - GA4 -> Configure Tag Settings
google_tag_id="GT-W6BN9SN"

# First one is picked as the Twitter card image if not set on page.
# images = ["images/project-illustration.png"]

Expand All @@ -115,28 +166,21 @@ archived_version = false
# The version number for the version of the docs represented in this doc set.
# Used in the "version-banner" partial to display a version number for the
# current doc set.
version = "v1.19"
version = "latest"

# A link to latest version of the docs. Used in the "version-banner" partial to
# point people to the main doc site.
url_latest_version = "https://example.com"
url_latest_version = "https://spinnaker.io/docs/"

# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
github_repo = "https://github.com/spinnaker/spinnaker.io"
# An optional link to a related project repo. For example, the sibling repository where your product code lives.
github_project_repo = "https://github.com/spinnaker/spinnaker"

# Specify a value here if your content directory is not in your repo's root directory
# github_subdir = ""

# Google Custom Search Engine ID. Remove or comment out to disable search.
# gcs_engine_id = "011737558837375720776:fsdu1nryfng"

# Enable Algolia DocSearch
algolia_docsearch = false

# Enable Lunr.js offline search
offlineSearch = true
offlineSearchMaxResults = 50
offlineSearchSummaryLength = 200

# Promo Banner variables
[params.promoBanner]
Expand All @@ -146,8 +190,6 @@ offlineSearch = true
ctaText = "Browse Playlist"
label = ""



# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.
Expand All @@ -169,8 +211,8 @@ footer_about_disable = false
[params.ui.feedback]
enable = false
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
yes = 'Glad to hear it! Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
yes = 'Glad to hear it! Please <a href="https://github.com/spinnaker/spinnaker.io/issues/new">tell us how we can improve</a>.'
no = 'Sorry to hear that. Please <a href="https://github.com/spinnaker/spinnaker.io/issues/new">tell us how we can improve</a>.'

# Adds a reading time to the top of each doc.
# If you want this feature, but occasionally need to remove the Reading time from a single page,
Expand All @@ -179,22 +221,6 @@ no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY
enable = false

[params.links]
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
# [[params.links.user]]
# name = "User mailing list"
# url = "https://example.org/mail"
# icon = "fa fa-envelope"
# desc = "Discussion and help from your fellow users"
# [[params.links.user]]
# name ="Twitter"
# url = "https://example.org/twitter"
# icon = "fab fa-twitter"
# desc = "Follow us on Twitter to get the latest news!"
# [[params.links.user]]
# name = "Stack Overflow"
# url = "https://example.org/stack"
# icon = "fab fa-stack-overflow"
# desc = "Practical questions and curated answers"
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
[[params.links.developer]]
name = "GitHub"
Expand Down Expand Up @@ -234,55 +260,3 @@ enable = false
weight = 50
url = "https://github.com/spinnaker"
pre = "<i class='fab fa-github'></i>"
# Add your release versions here


# baseURL = "/"
# languageCode = "en-us"
# title = "Spinnaker"
# disableKinds = ["taxonomy", "taxonomyTerm"]
# theme = "docsy-master"

# Settings for goldmark markdown processing
# [markup]
# [markup.goldmark]
# [markup.goldmark.renderer]
# unsafe = true

# Image processing configuration.
# [imaging]
# resampleFilter = "CatmullRom" # use standard Box processor for now
# quality = 75
# anchor = "smart"
# disableDate = false
# disableLatLong = false

# main menu
# [[menu.main]]
# name = "Home"
# url = "/"
# weight = 1

# [[menu.main]]
# name = "Getting Started"
# url = "/en/getting-started/"
# weight = 1
#
# [[menu.main]]
# name = "Docs"
# url = "/en/docs/"
# weight = 2
#
# [[menu.main]]
# name = "Community"
# url = "/en/docs/community/"
# weight = 3
#
# [[menu.main]]
# name = "Blog"
# url = "https://blog.spinnaker.io/"
# weight = 4
#
# [permalinks]
# post = "/:year/:month/:day/:slug/"
# pages = "/:filename/"
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=
Loading

0 comments on commit 23cf170

Please sign in to comment.