Skip to content

Commit

Permalink
fixed mermaid in relevant pages
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeeu committed Sep 8, 2023
1 parent 5a6b43f commit 11d3dc3
Show file tree
Hide file tree
Showing 29 changed files with 394 additions and 405 deletions.
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,9 @@ news_link: 'https://google.com'

## Mermaid

Mermaid is loaded into content pages only when the boolean frontmatter variable `mermaid` is set to `true`.
The Docsy theme supports Mermaid diagrams. See https://www.docsy.dev/docs/adding-content/diagrams-and-formulae/#diagrams-with-mermaid

1. Use the `mermaid` shortcode to make sure your graph isn't processed as markdown:

```
{{< mermaid >}}
graph TB
clouddriver(Clouddriver) --> clouddriver-caching(Clouddriver-Caching);
clouddriver --> clouddriver-rw(Clouddriver-RW);
clouddriver --> clouddriver-ro(Clouddriver-RO);
clouddriver --> clouddriver-ro-deck(Clouddriver-RO-Deck)
classDef default fill:#d8e8ec,stroke:#39546a;
linkStyle default stroke:#39546a,stroke-width:1px,fill:none;
classDef split fill:#42f4c2,stroke:#39546a;
class clouddriver-caching,clouddriver-ro,clouddriver-ro-deck,clouddriver-rw,echo-scheduler,echo-worker split
{{< /mermaid >}}
```

2. Add the frontmatter variable to the page: `mermaid: true`.

## Custom YouTube Shortcode

Expand Down
2 changes: 1 addition & 1 deletion assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@import 'homepage-hero';
@import 'slick-theme';
@import 'slick';
@import 'docs';
@import 'navbar';


h3 {
margin-bottom: 1.6rem;
}
Expand Down
25 changes: 0 additions & 25 deletions assets/scss/docs.scss

This file was deleted.

2 changes: 2 additions & 0 deletions assets/scss/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
margin-left: 15px;
}
}


.navbar-expand .navbar-nav .nav-link {
padding-right: 1rem;
padding-left: 1rem;
Expand Down
225 changes: 113 additions & 112 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,72 @@
baseURL = "/"
title = "Spinnaker"

enableRobotsTXT = true
enableInlineShortcodes = true
# Will give values to .Lastmod etc.
enableGitInfo = true

# 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

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
# 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"

# Will give values to .Lastmod etc.
enableGitInfo = true
[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"

# Language settings
contentDir = "content/en"
Expand All @@ -18,50 +77,25 @@ enableMissingTranslationPlaceholders = true

disableKinds = ["taxonomy", "taxonomyTerm"]

# Highlighting config
# Google Analytics configuration
# https://gohugo.io/templates/internal/#configure-google-analytics
# https://www.docsy.dev/docs/adding-content/feedback/#adding-analytics
googleAnalytics = "G-H0XE7ESBFR"

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

# 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 next line to disable GA tracking. Also disables 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,20 +110,41 @@ 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



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






# 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.'
Expand All @@ -111,28 +166,24 @@ 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 @@ -148,6 +199,8 @@ offlineSearch = true
[params.ui]
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = true
sidebar_menu_foldable= true
sidebar_cache_limit = 10
# Set to true to disable breadcrumb navigation.
breadcrumb_disable = false
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
Expand All @@ -165,8 +218,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 Down Expand Up @@ -230,55 +283,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/"
2 changes: 2 additions & 0 deletions content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ contrib_text:
who_should_use_header: 'Who should use Spinnaker?'
who_should_use_text: 'Spinnaker provides application management and deployment to help you release software changes with high velocity and confidence. Spinnaker is an open-source, multi-cloud continuous delivery platform that combines a powerful and flexible pipeline management system with integrations to the major cloud providers. If you are looking to standardize your release processes and improve quality, Spinnaker is for you. '
---

{{% promoBanner %}}
Loading

0 comments on commit 11d3dc3

Please sign in to comment.