From d1769f6c31ec7ae75879a4d9b4c42bd0577d341b Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 30 Mar 2020 11:57:21 -0700 Subject: [PATCH 1/4] docs: Update hugo version used by netlify --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index d335d812be..bbf6fcf397 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,7 +4,7 @@ publish = "site/public/" command = "pwd && cd themes/docsy && git submodule update -f --init && cd ../.. && hugo" [build.environment] -HUGO_VERSION = "0.59.0" +HUGO_VERSION = "0.68.3" [context.production.environment] HUGO_ENV = "production" From 9d64dfdfe0a8169d9e391eba0f1f3d2a7fcfe67b Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 30 Mar 2020 19:31:17 -0700 Subject: [PATCH 2/4] Make site mostly compatible with hugo v0.69.0 through criminal hacks --- site/config.toml | 48 +++++++-------------- site/layouts/partials/sidebar-tree.html | 57 +++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 32 deletions(-) create mode 100644 site/layouts/partials/sidebar-tree.html diff --git a/site/config.toml b/site/config.toml index c241a41581..4b9529f580 100644 --- a/site/config.toml +++ b/site/config.toml @@ -29,43 +29,27 @@ pygmentsStyle = "tango" # First one is picked as the Twitter card image if not set on page. #images = ["images/project-illustration.png"] +# Auto-generate the menu +# sectionPagesMenu = "main" + # Configure how URLs look like per section. [permalinks] blog = "/:section/:year/:month/:day/:slug/" -[module] - [[module.mounts]] - source = "../deploy/addons/gvisor/" - target = "content/gvisor/" - [[module.mounts]] - source = "../deploy/addons/helm-tiller/" - target = "content/helm-tiller/" - [[module.mounts]] - source = "../deploy/addons/istio/" - target = "content/istio/" - [[module.mounts]] - source = "../deploy/addons/ingress-dns/" - target = "content/ingress-dns/" - [[module.mounts]] - source = "../deploy/addons/storage-provisioner-gluster/" - target = "content/storage-provisioner-gluster/" - [[module.mounts]] - source = "../deploy/addons/layouts/" - target = "layouts" +[markup] + [markup.highlight] + codeFences = true + hl_Lines = "" + lineNoStart = 1 + lineNos = false + lineNumbersInTable = true + noClasses = true + style = "vs" + tabWidth = 4 - [[module.mounts]] - source = "content/en" - target = "content" - [[module.mounts]] - source = "layouts" - target = "layouts" - -## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday -[blackfriday] -plainIDAnchors = true -hrefTargetBlank = true -angledQuotes = false -latexDashes = true +# allow html in markdown +[markup.goldmark.renderer] + unsafe=true # Image processing configuration. [imaging] diff --git a/site/layouts/partials/sidebar-tree.html b/site/layouts/partials/sidebar-tree.html new file mode 100644 index 0000000000..9b4dfa3503 --- /dev/null +++ b/site/layouts/partials/sidebar-tree.html @@ -0,0 +1,57 @@ +{{/* We cache this partial for bigger sites and set the active class client side. */}} +{{ $shouldDelayActive := ge (len .Site.Pages) 2000 }} +
+ {{ if not .Site.Params.ui.sidebar_search_disable }} + + {{ end }} + +
+{{ define "section-tree-nav-section" }} +{{ $s := .section }} +{{ $p := .page }} +{{ $shouldDelayActive := .delayActive }} +{{ $active := eq $p.CurrentSection $s }} +{{ $show := or (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsAncestor $s)) ($p.IsDescendant $s) }} + +{{/* minikube hack: Override $show due to a Hugo upgrade bug */}} +{{ $show = true }} +{{/* end minikube hack */}} + +{{ $sid := $s.RelPermalink | anchorize }} + +{{ end }} From f956f6a69ab60b49d9aa1d8a646d93bbd70b1693 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Mon, 30 Mar 2020 19:36:12 -0700 Subject: [PATCH 3/4] Cleaner diff --- site/config.toml | 3 --- site/layouts/partials/sidebar-tree.html | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/site/config.toml b/site/config.toml index 4b9529f580..e0c6e2a4bc 100644 --- a/site/config.toml +++ b/site/config.toml @@ -29,9 +29,6 @@ pygmentsStyle = "tango" # First one is picked as the Twitter card image if not set on page. #images = ["images/project-illustration.png"] -# Auto-generate the menu -# sectionPagesMenu = "main" - # Configure how URLs look like per section. [permalinks] blog = "/:section/:year/:month/:day/:slug/" diff --git a/site/layouts/partials/sidebar-tree.html b/site/layouts/partials/sidebar-tree.html index 9b4dfa3503..ebf99e2a74 100644 --- a/site/layouts/partials/sidebar-tree.html +++ b/site/layouts/partials/sidebar-tree.html @@ -1,5 +1,5 @@ -{{/* We cache this partial for bigger sites and set the active class client side. */}} -{{ $shouldDelayActive := ge (len .Site.Pages) 2000 }} +{{/* minikube hack: temporarily forked from docsy/layouts/partials/sidebar-tree.html due to hugo v0.69 compatibility issues */}} +
{{ if not .Site.Params.ui.sidebar_search_disable }}