diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 75ae975ca4..a3e818a9fa 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -100,7 +100,7 @@ disableHugoGeneratorInject = true [[languages.en.menu.shortcuts]] name = " Showcases" - url = "more/showcase/" + url = "showcase/" weight = 11 [[languages.en.menu.shortcuts]] @@ -140,7 +140,7 @@ disableHugoGeneratorInject = true [[languages.pir.menu.shortcuts]] name = " Showcases" - url = "more/showcase/" + url = "showcase/" weight = 11 [[languages.pir.menu.shortcuts]] diff --git a/exampleSite/content/cont/menushortcuts.en.md b/exampleSite/content/cont/menushortcuts.en.md index 326ca38117..e133921599 100644 --- a/exampleSite/content/cont/menushortcuts.en.md +++ b/exampleSite/content/cont/menushortcuts.en.md @@ -20,7 +20,7 @@ weight = 10 [[menu.shortcuts]] name = " Showcases" -url = "more/showcase/" +url = "showcase/" weight = 11 [[menu.shortcuts]] @@ -75,7 +75,7 @@ Example from the current website: [[languages.en.menu.shortcuts]] name = " Showcases" - url = "more/showcase/" + url = "showcase/" weight = 11 [[languages.en.menu.shortcuts]] @@ -109,7 +109,7 @@ Example from the current website: [[languages.pir.menu.shortcuts]] name = " Showcases" - url = "more/showcase/" + url = "showcase/" weight = 11 [[languages.pir.menu.shortcuts]] diff --git a/exampleSite/content/more/credits/_index.en.md b/exampleSite/content/more/credits/_index.en.md index 852145a995..4ea6c7dd75 100644 --- a/exampleSite/content/more/credits/_index.en.md +++ b/exampleSite/content/more/credits/_index.en.md @@ -1,5 +1,4 @@ +++ -disableToc = true title = "Credits" +++ diff --git a/exampleSite/content/more/credits/_index.pir.md b/exampleSite/content/more/credits/_index.pir.md index 3a218c2877..db444ced85 100644 --- a/exampleSite/content/more/credits/_index.pir.md +++ b/exampleSite/content/more/credits/_index.pir.md @@ -1,5 +1,4 @@ +++ -disableToc = true title = "Crrredits" +++ {{< piratify >}} \ No newline at end of file diff --git a/exampleSite/content/more/showcase/_index.pir.md b/exampleSite/content/more/showcase/_index.pir.md deleted file mode 100644 index c13c8877b3..0000000000 --- a/exampleSite/content/more/showcase/_index.pir.md +++ /dev/null @@ -1,4 +0,0 @@ -+++ -title = "Showcase" -+++ -{{< piratify >}} \ No newline at end of file diff --git a/exampleSite/content/more/showcase/_index.en.md b/exampleSite/content/showcase/_index.en.md similarity index 85% rename from exampleSite/content/more/showcase/_index.en.md rename to exampleSite/content/showcase/_index.en.md index d2f778e8ae..e685fef2a8 100644 --- a/exampleSite/content/more/showcase/_index.en.md +++ b/exampleSite/content/showcase/_index.en.md @@ -1,5 +1,9 @@ +++ title = "Showcase" +[_build] + render = "always" + list = "never" + publishResources = true +++ ## [GoboLinux Wiki](https://wiki.gobolinux.org/) by NEONsys.org @@ -10,6 +14,6 @@ title = "Showcase" ![BITS image](bits-train.png?width=60pc&classes=shadow) -## [Pamasol Electrics](https://pamasol.github.io/de/) by Pamasol – Swiss Aerosol Solutions +## [Pamasol Electrics](https://pamasol.github.io/de/) by Pamasol ![Pamasol Electrics](pamasol-electrics-portal.png?width=60pc&classes=shadow) diff --git a/exampleSite/content/showcase/_index.pir.md b/exampleSite/content/showcase/_index.pir.md new file mode 100644 index 0000000000..4923652ba9 --- /dev/null +++ b/exampleSite/content/showcase/_index.pir.md @@ -0,0 +1,8 @@ ++++ +title = "Showcase" +[_build] + render = "always" + list = "never" + publishResources = true ++++ +{{< piratify >}} \ No newline at end of file diff --git a/exampleSite/content/more/showcase/bits-train.png b/exampleSite/content/showcase/bits-train.png similarity index 100% rename from exampleSite/content/more/showcase/bits-train.png rename to exampleSite/content/showcase/bits-train.png diff --git a/exampleSite/content/more/showcase/gobolinux.png b/exampleSite/content/showcase/gobolinux.png similarity index 100% rename from exampleSite/content/more/showcase/gobolinux.png rename to exampleSite/content/showcase/gobolinux.png diff --git a/exampleSite/content/more/showcase/pamasol-electrics-portal.png b/exampleSite/content/showcase/pamasol-electrics-portal.png similarity index 100% rename from exampleSite/content/more/showcase/pamasol-electrics-portal.png rename to exampleSite/content/showcase/pamasol-electrics-portal.png diff --git a/layouts/partials/nested-article.hugo b/layouts/partials/nested-article.hugo index e86fb43490..d9854b92c8 100644 --- a/layouts/partials/nested-article.hugo +++ b/layouts/partials/nested-article.hugo @@ -3,55 +3,34 @@ {{- $page.Page.Store.Set (printf "%sIsNested" $outputFormat) true }} {{- with $page }} {{- $currentNode := . }} - {{- $isActive := .IsHome }} - {{- $isShortcut := false }} - {{- with .Site.Menus.shortcuts }} - {{- range sort . "Weight" }} - {{- $shortcut := . }} - {{- $shortcutPage := $page.Site.GetPage (printf "%s" $shortcut.URL ) }} - {{- if and $shortcutPage (eq $shortcutPage.RelPermalink $page.RelPermalink) }} - {{- $isShortcut = true }} - {{- end }} + {{- $pages := .Pages }} + {{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }} + {{- $currentOrdersectionsby := .Params.ordersectionsby | default $defaultOrdersectionsby }} + {{- template "section-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} + {{- if $pages }} +
+

{{ T "Subsections" .Title }}

+ {{- end }} + {{- if eq $currentOrdersectionsby "title" }} + {{- range $pages.ByTitle }} + {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} + {{- end }} + {{- else }} + {{- range $pages.ByWeight }} + {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} {{- end }} {{- end }} - {{- $pages := .Site.Home.Pages }} - {{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }} - {{- $currentOrdersectionsby := .Site.Home.Params.ordersectionsby | default $defaultOrdersectionsby }} - {{- if $isShortcut }} - {{- template "section-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} - {{- else }} - {{- if $isActive }} - {{- template "section-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} - {{- if $pages }} -
-

{{ T "Subsections" .Title }}

- {{- end }} - {{- end }} - {{- if eq $currentOrdersectionsby "title" }} - {{- range $pages.ByTitle }} - {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat "isActive" $isActive }} - {{- end }} - {{- else }} - {{- range $pages.ByWeight }} - {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat "isActive" $isActive }} - {{- end }} - {{- end }} - {{- if $isActive }} - {{- if $pages }} -
- {{- end }} - {{- end }} + {{- if $pages }} +
{{- end }} {{- end }} {{- define "section-tree-print" }} {{- $currentNode := .currentnode }} {{- $outputFormat := .outputFormat }} - {{- $isActive := .isActive }} {{- $currentFileRelPermalink := .currentnode.RelPermalink }} {{- with .sect }} {{- $isSelf := eq .RelPermalink $currentFileRelPermalink }} {{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }} - {{- $isActive = or $isSelf $isActive }} {{- $pages := .Pages }} {{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} {{- $hidden := and $relearnIsHiddenFrom (not $.showhidden) (not $isSelf) (not $isAncestor) }} @@ -59,26 +38,22 @@ {{- else }} {{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }} {{- $currentOrdersectionsby := .Params.ordersectionsby | default $defaultOrdersectionsby }} - {{- if $isActive }} - {{- template "section-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} - {{- if $pages }} + {{- template "section-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} + {{- if $pages }}

{{ T "Subsections" .Title }}

- {{- end }} {{- end }} {{- if eq $currentOrdersectionsby "title" }} {{- range $pages.ByTitle }} - {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat "isActive" $isActive }} + {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} {{- end }} {{- else }} {{- range $pages.ByWeight }} - {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat "isActive" $isActive }} + {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "outputFormat" $outputFormat }} {{- end }} {{- end }} - {{- if $isActive }} - {{- if $pages }} + {{- if $pages }}
- {{- end }} {{- end }} {{- end }} {{- end }} @@ -93,4 +68,4 @@ {{- $currentNode.Page.Store.Set "nestedHasMermaid" (or ($currentNode.Page.Store.Get "nestedHasMermaid") (.Page.Store.Get "hasMermaid")) }} {{- $currentNode.Page.Store.Set "nestedHasOpenapi" (or ($currentNode.Page.Store.Get "nestedHasOpenapi") (.Page.Store.Get "hasOpenapi")) }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }}