From f889e52566445b2ca33a75c4ccf9abf7a0b71d44 Mon Sep 17 00:00:00 2001 From: mvtango Date: Wed, 29 Jan 2025 02:46:56 +0100 Subject: [PATCH 01/18] Three hugo deprecations (#664) * as per deprecation note: ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead. * as per deprecation note: ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead. * deprecated: .Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. * as per deprecation note: ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead. * resources.ToCSS was deprecated in Hugo v0.128.0 and will be removed in a future release. Use css.Sass instead. * ignore ressources from example site --- .gitignore | 1 + layouts/partials/docs/html-head.html | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5944200..f29c7d8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ public/ exampleSite/public/ .DS_Store .hugo_build.lock +resources/ diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index cf45edb..6a6d0ec 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -25,7 +25,6 @@ {{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | css.Sass | resources.Minify | resources.Fingerprint }} - {{- if default true .Site.Params.BookSearch -}} {{- $searchJSFile := printf "%s.search.js" .Language.Lang }} {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} From 60f4c03b8bab046f30ef6d59d7c04b4781f2ef10 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Thu, 30 Jan 2025 22:01:36 +0100 Subject: [PATCH 02/18] #672: Add tabs unique ID for nested tabs, uses .Ordinal by default --- exampleSite/content.en/docs/shortcodes/tabs.md | 2 +- layouts/shortcodes/tab.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/content.en/docs/shortcodes/tabs.md b/exampleSite/content.en/docs/shortcodes/tabs.md index 0af3a9d..13da867 100644 --- a/exampleSite/content.en/docs/shortcodes/tabs.md +++ b/exampleSite/content.en/docs/shortcodes/tabs.md @@ -3,7 +3,7 @@ Tabs let you organize content by context, for example installation instructions for each supported platform. ```tpl -{{%/* tabs */%}} +{{%/* tabs "id" */%}} {{%/* tab "MacOS" */%}} # MacOS Content {{%/* /tab */%}} {{%/* tab "Linux" */%}} # Linux Content {{%/* /tab */%}} {{%/* tab "Windows" */%}} # Windows Content {{%/* /tab */%}} diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index df42428..b420770 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -1,4 +1,4 @@ -{{- $group := printf "tabs-%d" .Parent.Ordinal -}} +{{- $group := printf "tabs-%s" (default .Parent.Ordinal (.Parent.Get 0)) -}} {{- $tab := printf "%s-%d" $group .Ordinal }}