diff --git a/assets/_relearn_searchindex.js b/assets/_relearn_searchindex.js index 05d109a25e..0fd9dfb2a6 100644 --- a/assets/_relearn_searchindex.js +++ b/assets/_relearn_searchindex.js @@ -1,15 +1,15 @@ -{{- partialCached "page-meta.hugo" . .RelPermalink }} +{{- partialCached "relearn-meta.gotmpl" . .RelPermalink }} {{- $pages := slice }} {{- range .Site.Pages }} - {{- if partial "pageHelper/isRelearnSpecialPage.html" . }} + {{- if partial "_relearn/pageIsSpecial.gotmpl" . }} {{- else if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }} {{- $tags := slice }} {{- range .GetTerms "tags" }} - {{- $tags = $tags | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }} + {{- $tags = $tags | append (partial "title.gotmpl" (dict "page" .Page "linkTitle" true) | plainify) }} {{- end }} {{- $pages = $pages | append (dict - "uri" (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) - "title" (partial "pageHelper/title.hugo" (dict "page" .) | plainify) + "uri" (partial "permalink.gotmpl" (dict "to" .)) + "title" (partial "title.gotmpl" (dict "page" .) | plainify) "tags" $tags "breadcrumb" (trim (partial "breadcrumbs.html" (dict "page" . "dirOnly" true) | plainify | htmlUnescape) "\n\r\t ") "description" (trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " ) diff --git a/assets/css/auto.css b/assets/css/auto.css index 81b339640c..6351f2ce94 100644 --- a/assets/css/auto.css +++ b/assets/css/auto.css @@ -1,3 +1,3 @@ -{{- $assetBusting := partialCached "assetbusting.hugo" . -}} +{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}} @import "{{ printf "%s-%s.css%s" .prefix .light $assetBusting }}" screen and (prefers-color-scheme: light); @import "{{ printf "%s-%s.css%s" .prefix .dark $assetBusting }}" screen and (prefers-color-scheme: dark); diff --git a/assets/css/format-print.css b/assets/css/format-print.css index 930447b74e..341bb67f14 100644 --- a/assets/css/format-print.css +++ b/assets/css/format-print.css @@ -1,4 +1,4 @@ -{{- $assetBusting := partialCached "assetbusting.hugo" . -}} +{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}} @import "{{ printf "theme-%s.css%s" .themevariant.identifier $assetBusting }}"; @import "{{ printf "chroma-%s.css%s" .themevariant.chroma $assetBusting }}"; diff --git a/assets/css/print.css b/assets/css/print.css index ae99577935..61b39f0b2a 100644 --- a/assets/css/print.css +++ b/assets/css/print.css @@ -1,2 +1,2 @@ -{{- $assetBusting := partialCached "assetbusting.hugo" . -}} +{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}} @import "{{ printf "format-print.css%s" $assetBusting }}"; diff --git a/assets/css/swagger.css b/assets/css/swagger.css index 1a6dbd0951..c7e1a86bc4 100644 --- a/assets/css/swagger.css +++ b/assets/css/swagger.css @@ -1,4 +1,4 @@ -{{- $assetBusting := partialCached "assetbusting.hugo" . -}} +{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}} /* Styles to make Swagger-UI fit into our theme */ @import "{{ printf "fonts.css%s" $assetBusting }}"; diff --git a/assets/css/theme-relearn.css b/assets/css/theme-relearn.css index 141193bf35..24bf303e0a 100644 --- a/assets/css/theme-relearn.css +++ b/assets/css/theme-relearn.css @@ -1,4 +1,4 @@ -{{- $assetBusting := partialCached "assetbusting.hugo" . -}} +{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}} /* this file is here for compatiblity with older installations use theme-relearn-light instead */ @import "{{ printf "theme-relearn-light.css%s" $assetBusting }}"; diff --git a/exampleSite/layouts/partials/menu-footer.html b/exampleSite/layouts/partials/menu-footer.html index c530a191d6..dbb4c4c11c 100644 --- a/exampleSite/layouts/partials/menu-footer.html +++ b/exampleSite/layouts/partials/menu-footer.html @@ -1,4 +1,4 @@ -{{- $assetBusting := partialCached "assetbusting.hugo" . }} +{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}

Built with by Hugo

{{- partial "dependencies.html" (dict "page" . "location" "footer") }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index fcb652bb6e..cf5a494b07 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,5 +1,5 @@ {{- /* based on Hugo 0.125.5 rss.xml */}} -{{- partialCached "page-meta.hugo" . .RelPermalink }} +{{- partialCached "relearn-meta.gotmpl" . .RelPermalink }} {{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} {{- $authorEmail := "" }} {{- if and .Site.Params.author (reflect.IsMap .Site.Params.author) .Site.Params.author.email }} @@ -15,7 +15,7 @@ {{- end }} {{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} -{{- $authorName := partialCached "authorname.hugo" . }} +{{- $authorName := partialCached "_relearn/authorName.gotmpl" . }} {{- $pages := .Pages }} {{- $limit := .Site.Config.Services.RSS.Limit }} @@ -27,8 +27,8 @@ {{- printf "" | safeHTML }} - {{ partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }} - {{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }} + {{ partial "title.gotmpl" (dict "page" . "fullyQualified" true "reverse" true) }} + {{ partial "permalink.gotmpl" (dict "to" . "abs" true) }} {{ trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " | transform.XMLEscape | safeHTML }} Hugo {{ site.Language.LanguageCode }}{{ with $authorEmail }} @@ -37,12 +37,12 @@ {{ . }}{{ end }}{{ if not .Date.IsZero }} {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "rss" }} - {{ printf "" ( partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true)) .MediaType | safeHTML }} + {{ printf "" ( partial "permalink.gotmpl" (dict "to" . "abs" true)) .MediaType | safeHTML }} {{- end }} {{- range $pages }} {{- $visible := true }} {{- $relearnIsHiddenFrom := index ($page.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} - {{- if partial "pageHelper/isRelearnSpecialPage.html" . }} + {{- if partial "_relearn/pageIsSpecial.gotmpl" . }} {{- $visible = false }} {{- else if or (eq .Kind "taxonomy") (eq .Kind "term") }} {{- $visible = and .Title .Permalink (or (not $relearnIsHiddenFrom) (ne .Site.Params.disableTagHiddenPages true) ) }} @@ -51,11 +51,11 @@ {{- end }} {{- if $visible }} - {{ partial "pageHelper/title.hugo" (dict "page" .) }} - {{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }} + {{ partial "title.gotmpl" (dict "page" .) }} + {{ partial "permalink.gotmpl" (dict "to" . "abs" true) }} {{ (or .PublishDate .Date).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} - {{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }} + {{ partial "permalink.gotmpl" (dict "to" . "abs" true) }} {{ trim (or .Description .Summary | plainify | htmlUnescape) "\n\r\t " | transform.XMLEscape | safeHTML }} {{- end }} diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml index 213a9ca081..f5f8774434 100644 --- a/layouts/_default/sitemap.xml +++ b/layouts/_default/sitemap.xml @@ -1,17 +1,17 @@ {{- /* based on Hugo 0.125.5 sitemap.xml */}} -{{- partialCached "page-meta.hugo" . .RelPermalink }} +{{- partialCached "relearn-meta.gotmpl" . .RelPermalink }} {{- printf "" | safeHTML }} {{- range where .Pages "Sitemap.Disable" "ne" true }} - {{- if partial "pageHelper/isRelearnSpecialPage.html" . }} + {{- if partial "_relearn/pageIsSpecial.gotmpl" . }} {{- else if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) }} - {{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }}{{ if not .Lastmod.IsZero }} + {{ partial "permalink.gotmpl" (dict "to" . "abs" true) }}{{ if not .Lastmod.IsZero }} {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range $index, $trans := .AllTranslations }}{{- if eq $index 0 }} - {{ end }} - {{ end }}{{ end }} + {{ end }} + {{ end }}{{ end }} {{- end -}} {{- end }} diff --git a/layouts/alias.html b/layouts/alias.html index 4a2ff95670..78b59a093a 100644 --- a/layouts/alias.html +++ b/layouts/alias.html @@ -9,15 +9,15 @@ {{- $url = replace $url "//" "/" }} {{- with site.Home.GetPage $url }} {{- /* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}} - {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- $url = partial "permalink.gotmpl" (dict "to" .) }} {{- else }} {{- $url_alt := replaceRE "^/[^/]*(/.*)" "${1}" $url }} {{- with site.Home.GetPage $url_alt }} {{- /* if defaultContentLanguageInSubdir=true we are ending here for home page */}} - {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- $url = partial "permalink.gotmpl" (dict "to" .) }} {{- else }} {{- /* for regular aliases we are ending here with no original page found */}} - {{- $url = partial "relLangPrettyUglyURL.hugo" (dict "link" $url) }} + {{- $url = partial "permalink.gotmpl" (dict "link" $url) }} {{- end }} {{- end }} diff --git a/layouts/partials/assetbusting.hugo b/layouts/partials/_relearn/assetbusting.gotmpl similarity index 100% rename from layouts/partials/assetbusting.hugo rename to layouts/partials/_relearn/assetbusting.gotmpl diff --git a/layouts/partials/authorname.hugo b/layouts/partials/_relearn/authorName.gotmpl similarity index 100% rename from layouts/partials/authorname.hugo rename to layouts/partials/_relearn/authorName.gotmpl diff --git a/layouts/partials/fileExists.hugo b/layouts/partials/_relearn/fileExists.gotmpl similarity index 100% rename from layouts/partials/fileExists.hugo rename to layouts/partials/_relearn/fileExists.gotmpl diff --git a/layouts/partials/make-random-md5.hugo b/layouts/partials/_relearn/makeRandomMd5.gotmpl similarity index 100% rename from layouts/partials/make-random-md5.hugo rename to layouts/partials/_relearn/makeRandomMd5.gotmpl diff --git a/layouts/partials/nested-content.hugo b/layouts/partials/_relearn/nestedContent.gotmpl similarity index 100% rename from layouts/partials/nested-content.hugo rename to layouts/partials/_relearn/nestedContent.gotmpl diff --git a/layouts/partials/pageHelper/depth.hugo b/layouts/partials/_relearn/pageDepth.gotmpl similarity index 75% rename from layouts/partials/pageHelper/depth.hugo rename to layouts/partials/_relearn/pageDepth.gotmpl index 228393aeab..3fdbb11208 100644 --- a/layouts/partials/pageHelper/depth.hugo +++ b/layouts/partials/_relearn/pageDepth.gotmpl @@ -3,7 +3,7 @@ {{- $depth := .depth | default 0 }} {{- with $page.Parent }} {{- $depth = add $depth 1 }} - {{- partial "pageHelper/depth.hugo" (dict "page" . "depth" $depth) }} + {{- partial "_relearn/pageDepth.gotmpl" (dict "page" . "depth" $depth) }} {{- else }} {{- $depth }} {{- end }} \ No newline at end of file diff --git a/layouts/partials/pageHelper/isRelearnSpecialPage.html b/layouts/partials/_relearn/pageIsSpecial.gotmpl similarity index 100% rename from layouts/partials/pageHelper/isRelearnSpecialPage.html rename to layouts/partials/_relearn/pageIsSpecial.gotmpl diff --git a/layouts/partials/pageHelper/next.html b/layouts/partials/_relearn/pageNext.gotmpl similarity index 100% rename from layouts/partials/pageHelper/next.html rename to layouts/partials/_relearn/pageNext.gotmpl diff --git a/layouts/partials/pageHelper/prev.html b/layouts/partials/_relearn/pagePrev.gotmpl similarity index 100% rename from layouts/partials/pageHelper/prev.html rename to layouts/partials/_relearn/pagePrev.gotmpl diff --git a/layouts/partials/pageHelper/pagesBy.html b/layouts/partials/_relearn/pages.gotmpl similarity index 94% rename from layouts/partials/pageHelper/pagesBy.html rename to layouts/partials/_relearn/pages.gotmpl index 588b63771f..fb50069baa 100644 --- a/layouts/partials/pageHelper/pagesBy.html +++ b/layouts/partials/_relearn/pages.gotmpl @@ -33,7 +33,7 @@ {{- $filtered_pages := slice }} {{- range $pages }} - {{- if not (partial "pageHelper/isRelearnSpecialPage.html" .) }} + {{- if not (partial "_relearn/pageIsSpecial.gotmpl" .) }} {{- $filtered_pages = $filtered_pages | append . }} {{- end }} {{- end }} diff --git a/layouts/partials/pageHelper/taxonomyPages.html b/layouts/partials/_relearn/pagesTaxonomy.gotmpl similarity index 74% rename from layouts/partials/pageHelper/taxonomyPages.html rename to layouts/partials/_relearn/pagesTaxonomy.gotmpl index eebaedf15a..ce4616f8d2 100644 --- a/layouts/partials/pageHelper/taxonomyPages.html +++ b/layouts/partials/_relearn/pagesTaxonomy.gotmpl @@ -8,7 +8,7 @@ {{- end }} {{- end }} {{- if $count }} - {{- $pages = $pages| append (dict "Title" (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true)) "Page" .Page "Count" $count )}} + {{- $pages = $pages| append (dict "Title" (partial "title.gotmpl" (dict "page" .Page "linkTitle" true)) "Page" .Page "Count" $count )}} {{- end }} {{- end }} {{- $pages = sort $pages ".Title" }} diff --git a/layouts/partials/pageHelper/termPages.html b/layouts/partials/_relearn/pagesTerm.gotmpl similarity index 100% rename from layouts/partials/pageHelper/termPages.html rename to layouts/partials/_relearn/pagesTerm.gotmpl diff --git a/layouts/partials/relBasePath.hugo b/layouts/partials/_relearn/relBasePath.gotmpl similarity index 100% rename from layouts/partials/relBasePath.hugo rename to layouts/partials/_relearn/relBasePath.gotmpl diff --git a/layouts/partials/relBaseUri.hugo b/layouts/partials/_relearn/relBaseUri.gotmpl similarity index 100% rename from layouts/partials/relBaseUri.hugo rename to layouts/partials/_relearn/relBaseUri.gotmpl diff --git a/layouts/partials/get-theme-variants.hugo b/layouts/partials/_relearn/themeVariants.gotmpl similarity index 99% rename from layouts/partials/get-theme-variants.hugo rename to layouts/partials/_relearn/themeVariants.gotmpl index 2efcac7296..8faa90ed4d 100644 --- a/layouts/partials/get-theme-variants.hugo +++ b/layouts/partials/_relearn/themeVariants.gotmpl @@ -125,7 +125,7 @@ Chroma auto run: {{- end }} {{- with resources.Get "css/variant.css" }} - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "relearn/assetbusting.hugo" . }} {{- $variantcontent := print `@import "variables.css` $assetBusting `";` "\n\n" .Content }} {{- range $page.Site.Params.boxStyle }} {{- $identifier := upper .identifier }} diff --git a/layouts/partials/bodys/taxonomy.html b/layouts/partials/bodys/taxonomy.html index 685a613374..4d150003f9 100644 --- a/layouts/partials/bodys/taxonomy.html +++ b/layouts/partials/bodys/taxonomy.html @@ -3,11 +3,11 @@
-{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }} +{{- $title := partial "title.gotmpl" (dict "page" .) }}

{{ $title }}

{{- .Content }} {{- $lastCapital := "" }} -{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }} +{{- $pages := partialCached "partials/_relearn/pagesTaxonomy.gotmpl" . . }} {{- range $pages }} {{- $capital := substr .Title 0 1 | upper }} {{- if ne $lastCapital $capital }} @@ -18,7 +18,7 @@
    {{- end }} {{- /* display terms of a taxonomy */}} -
  • {{ .Title }} ({{ .Count }})
  • +
  • {{ .Title }} ({{ .Count }})
  • {{- $lastCapital = $capital }} {{- end }} {{- if ne $lastCapital "" }} diff --git a/layouts/partials/bodys/term.html b/layouts/partials/bodys/term.html index b7d2d219e5..4c87b97fb0 100644 --- a/layouts/partials/bodys/term.html +++ b/layouts/partials/bodys/term.html @@ -3,11 +3,11 @@
    -{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }} +{{- $title := partial "title.gotmpl" (dict "page" .) }}

    {{ $title }}

    {{- .Content }} {{- $lastCapital := "" }} -{{- $pages := partialCached "partials/pageHelper/termPages.html" . . }} +{{- $pages := partialCached "partials/_relearn/pagesTerm.gotmpl" . . }} {{- range $pages }} {{- $capital := substr .Title 0 1 | upper }} {{- if ne $lastCapital $capital }} @@ -22,7 +22,7 @@ {{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }} {{- $breadcrumb = trim (partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true) | plainify | htmlUnescape) "\n\r\t " }} {{- end }} -
  • {{ .Title }}{{ with $breadcrumb }}{{ end }}
  • +
  • {{ .Title }}{{ with $breadcrumb }}{{ end }}
  • {{- $lastCapital = $capital }} {{- end }} {{- if ne $lastCapital "" }} diff --git a/layouts/partials/bodys/tree.html b/layouts/partials/bodys/tree.html index 2cabcb17ed..c382451468 100644 --- a/layouts/partials/bodys/tree.html +++ b/layouts/partials/bodys/tree.html @@ -6,7 +6,7 @@ {{- with .sect }} {{- $isSelf := eq .RelPermalink $currentFileRelPermalink }} {{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }} - {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" .) }} + {{- $pages := partial "_relearn/pages.gotmpl" (dict "page" .) }} {{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} {{- $hidden := and $relearnIsHiddenFrom (not $.showhidden) (not $isSelf) (not $isAncestor) }} {{- if $hidden }} @@ -29,11 +29,11 @@ {{- $currentNode := .currentnode }} {{- with .sect }} {{- $page := . }} - {{- partialCached "nested-content.hugo" $page $page.RelPermalink }} + {{- partialCached "_relearn/nestedContent.gotmpl" $page $page.RelPermalink }} {{- range $page.Site.Params.relearn.dependencies }} {{- $has := printf "has%s" .name }} {{- $hasnested := printf "relearnHasNested%s" .name }} {{- $currentNode.Page.Store.Set $hasnested (or ($currentNode.Page.Store.Get $hasnested) ($page.Page.Store.Get $has)) }} - {{- end }} + {{- end }} {{- end }} {{- end }} \ No newline at end of file diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index fe4d1eb52d..78a88a6f3e 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -1,20 +1,20 @@ {{- $page := .page }} {{- $to := $page }} -{{- $pageurl := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }} -{{- $lasturl := partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }} +{{- $pageurl := partial "permalink.gotmpl" (dict "to" $page) }} +{{- $lasturl := partial "permalink.gotmpl" (dict "to" $page) }} {{- if .dirOnly }} {{- $page = $page.Parent }} {{- $to = $page }} - {{- $lasturl = partial "relLangPrettyUglyURL.hugo" (dict "to" $page) }} + {{- $lasturl = partial "permalink.gotmpl" (dict "to" $page) }} {{- end }} -{{- $depth := add 1 (int (partial "pageHelper/depth.hugo" (dict "page" $page))) }} +{{- $depth := add 1 (int (partial "_relearn/pageDepth.gotmpl" (dict "page" $page))) }} {{- if .page.Site.Params.disableRootBreadcrumb }} {{- $depth = add $depth -1 }} {{- end }} {{- $breadcrumb := slice }} {{- range seq $depth }} {{- if $to }} - {{- if partial "pageHelper/isRelearnSpecialPage.html" $to }} + {{- if partial "_relearn/pageIsSpecial.gotmpl" $to }} {{- break }} {{- else if or $to.Title (eq $to.Kind "taxonomy") (eq $to.Kind "term") }} {{- $breadcrumb = $breadcrumb | append $to }} @@ -33,8 +33,8 @@ {{- range $i, $e := $breadcrumbReversed }} {{- $to := $e }} {{- $depth = add $depth 1 }} - {{- $title := partial "pageHelper/title.hugo" (dict "page" $to "linkTitle" true) }} - {{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }} + {{- $title := partial "title.gotmpl" (dict "page" $to "linkTitle" true) }} + {{- $url := partial "permalink.gotmpl" (dict "to" $to) }} {{- $isPage := eq $url $pageurl }} {{- $isLast := eq $url $lasturl }} {{- $link := and $url (not $isPage) }} diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 6647756650..5fa15d1c64 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,4 +1,4 @@ {{- /* the following check avoids to print out content of headless bundles if called from nested-content.html */}} -{{- if partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} +{{- if partial "permalink.gotmpl" (dict "to" .) }} {{- .Content }} {{- end }} \ No newline at end of file diff --git a/layouts/partials/dependencies/mathjax.html b/layouts/partials/dependencies/mathjax.html index 48c6e8c6cd..3d6b6e12c3 100644 --- a/layouts/partials/dependencies/mathjax.html +++ b/layouts/partials/dependencies/mathjax.html @@ -2,7 +2,7 @@ {{- $location := .location }} {{- if eq $location "footer" }} {{- with $page }} - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }} {{- $init := "{}" }} {{- if isset .Params "mathjaxinitialize" }} {{- $init = .Params.mathJaxInitialize }} diff --git a/layouts/partials/dependencies/mermaid.html b/layouts/partials/dependencies/mermaid.html index 764c27baa9..c0fc4dc3f4 100644 --- a/layouts/partials/dependencies/mermaid.html +++ b/layouts/partials/dependencies/mermaid.html @@ -2,7 +2,7 @@ {{- $location := .location }} {{- if eq $location "footer" }} {{- with $page }} - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }} diff --git a/layouts/partials/dependencies/openapi.html b/layouts/partials/dependencies/openapi.html index fd14916e50..486ed2ac64 100644 --- a/layouts/partials/dependencies/openapi.html +++ b/layouts/partials/dependencies/openapi.html @@ -2,7 +2,7 @@ {{- $location := .location }} {{- if eq $location "footer" }} {{- with $page }} - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }} {{- $urlOpenapi := "" }} {{- $relOpenapi := "" }} diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html index ed1b68850b..535f5507d2 100644 --- a/layouts/partials/favicon.html +++ b/layouts/partials/favicon.html @@ -1,4 +1,4 @@ - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }} {{- $faviconMatch := false }} {{- $svg := dict "ext" "svg" "type" "type=\"image/svg+xml\"" }} {{- $png := dict "ext" "png" "type" "type=\"image/png\"" }} diff --git a/layouts/partials/heading.html b/layouts/partials/heading.html index 807d346bf6..887100cebf 100644 --- a/layouts/partials/heading.html +++ b/layouts/partials/heading.html @@ -1,2 +1,2 @@ -{{- $title := partial "pageHelper/title.hugo" (dict "page" .) }} +{{- $title := partial "title.gotmpl" (dict "page" .) }}

    {{ $title }}

    \ No newline at end of file diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index 38928e07b3..ad17ce39e0 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -41,7 +41,7 @@ } } - {{- end }}
    @@ -23,7 +23,7 @@
      - {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" .Site.Home) }} + {{- $pages := partial "_relearn/pages.gotmpl" (dict "page" .Site.Home) }} {{- $defaultAlwaysopen := .Site.Params.alwaysopen | default false }} {{- range $pages }} {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks "alwaysopen" $defaultAlwaysopen }} @@ -40,7 +40,7 @@ {{- $shortcut := . }} {{- with $page.Site.GetPage (printf "%s" $shortcut.URL ) }} {{- $to := . }} -
    • {{ $shortcut.Pre }}{{ safeHTML $shortcut.Name }}{{ $shortcut.Post }}
    • +
    • {{ $shortcut.Pre }}{{ safeHTML $shortcut.Name }}{{ $shortcut.Post }}
    • {{- else }}
    • {{ $shortcut.Pre }}{{ safeHTML $shortcut.Name }}{{ $shortcut.Post }}
    • {{- end }} @@ -50,7 +50,7 @@ {{- end }} {{- $siteLanguages := .Site.Languages }} {{- $showlangswitch := and hugo.IsMultilingual (not .Site.Params.disableLanguageSwitchingButton) (gt (int (len $siteLanguages)) 1) }} - {{- $themevariants := partialCached "get-theme-variants.hugo" . }} + {{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" . }} {{- $showvariantswitch := gt (int (len $themevariants)) 1 }} {{- $footer := partial "menu-footer.html" . }} {{- $showfooter := not (eq 0 (int (len ($footer | plainify)))) }} @@ -69,7 +69,7 @@ {{- $page := .Page }} {{- $pageLang := .Page.Language.Lang }} {{- range .Page.AllTranslations }} - + {{- end }}
    @@ -122,7 +122,7 @@ {{- $isSelf := eq .RelPermalink $currentFileRelPermalink }} {{- $isAncestor := and (not $isSelf) (.IsAncestor $currentNode) }} {{- $isActive := $isSelf }} - {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" .) }} + {{- $pages := partial "_relearn/pages.gotmpl" (dict "page" .) }} {{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} {{- $hidden := and $relearnIsHiddenFrom (not $.showhidden) (not $isSelf) (not $isAncestor) }} {{- if $hidden }} @@ -135,8 +135,8 @@ {{- $subHidden := and $relearnIsSubHiddenFrom (not $.showhidden) (not $isSelfSub) (not $isAncestorSub) }} {{- $numberOfVisibleChildren = add $numberOfVisibleChildren (int (not $subHidden)) }} {{- end }} - {{- $title := partial "pageHelper/title.hugo" (dict "page" . "linkTitle" true) }} - {{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- $title := partial "title.gotmpl" (dict "page" . "linkTitle" true) }} + {{- $url := partial "permalink.gotmpl" (dict "to" .) }} {{- safeHTML .Params.head }} {{- if $numberOfVisibleChildren }} {{- $isCollapsible := or (.Params.collapsibleMenu | default .Site.Params.collapsibleMenu) (not $url) }} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 552c4e84c1..796ef7dca6 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -14,7 +14,7 @@ {{- end }} - {{- $authorName := partialCached "authorname.hugo" . }} + {{- $authorName := partialCached "_relearn/authorName.gotmpl" . }} {{- partial "twitter_cards.html" . }} {{- partial "opengraph.html" . }} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html index 124ccacb2a..534b6b5774 100644 --- a/layouts/partials/opengraph.html +++ b/layouts/partials/opengraph.html @@ -1,11 +1,11 @@ {{- /* based on Hugo 0.125.5 opengraph.html */}} - + {{- with site.Title | plainify }} {{- end }} -{{- with partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) | plainify }} +{{- with partial "title.gotmpl" (dict "page" . "fullyQualified" true "reverse" true) | plainify }} {{- end }} @@ -17,10 +17,10 @@ {{- end }} -{{- if and .IsPage (not (partial "pageHelper/isRelearnSpecialPage.html" .)) }} +{{- if and .IsPage (not (partial "_relearn/pageIsSpecial.gotmpl" .)) }} {{- with .FirstSection }} - + {{- end }} {{- $iso8601 := "2006-01-02T15:04:05-07:00" }} {{- with or .PublishDate .Date }} @@ -30,7 +30,7 @@ {{- end }} {{- range .GetTerms "tags" | first 6 }} - + {{- end }} {{- else }} diff --git a/layouts/partials/relLangPrettyUglyURL.hugo b/layouts/partials/permalink.gotmpl similarity index 100% rename from layouts/partials/relLangPrettyUglyURL.hugo rename to layouts/partials/permalink.gotmpl diff --git a/layouts/partials/page-meta.hugo b/layouts/partials/relearn-meta.gotmpl similarity index 97% rename from layouts/partials/page-meta.hugo rename to layouts/partials/relearn-meta.gotmpl index 7f8d693c80..36efdcc43b 100644 --- a/layouts/partials/page-meta.hugo +++ b/layouts/partials/relearn-meta.gotmpl @@ -65,7 +65,7 @@ section: {{- .Section }} {{- end }} {{- end }} - {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" .node) }} + {{- $pages := partial "_relearn/pages.gotmpl" (dict "page" .node) }} {{- range $pages }} {{- template "relearn-structure" dict "node" . "currentnode" $currentNode "hiddenstem" $hidden_stem "hiddencurrent" $hidden_from_current }} {{- end }} diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html index 18c54d7733..1fe3289bb7 100644 --- a/layouts/partials/schema.html +++ b/layouts/partials/schema.html @@ -1,5 +1,5 @@ {{- /* based on Hugo 0.125.5 schema.html */}} -{{- with partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) | plainify }} +{{- with partial "title.gotmpl" (dict "page" . "fullyQualified" true "reverse" true) | plainify }} {{- end }} @@ -36,17 +36,17 @@ Keywords precedence: */}} {{- $keywords := slice }} {{- range .GetTerms "keywords" }} - {{- $keywords = $keywords | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }} + {{- $keywords = $keywords | append (partial "title.gotmpl" (dict "page" .Page "linkTitle" true) | plainify) }} {{- else }} {{- with .Keywords }} {{- $keywords = . }} {{- else }} {{- range .GetTerms "tags" }} - {{- $keywords = $keywords | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }} + {{- $keywords = $keywords | append (partial "title.gotmpl" (dict "page" .Page "linkTitle" true) | plainify) }} {{- else }} {{- range $taxonomy, $_ := site.Taxonomies }} {{- range $.GetTerms $taxonomy }} - {{- $keywords = $keywords | append (partial "pageHelper/title.hugo" (dict "page" .Page "linkTitle" true) | plainify) }} + {{- $keywords = $keywords | append (partial "title.gotmpl" (dict "page" .Page "linkTitle" true) | plainify) }} {{- end }} {{- end }} {{- end }} diff --git a/layouts/partials/search.html b/layouts/partials/search.html index edcdeed866..d3f14a2755 100644 --- a/layouts/partials/search.html +++ b/layouts/partials/search.html @@ -1,5 +1,5 @@ {{- if not .Site.Params.disableSearch }} - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }} {{- $link := "" }} {{- with .Site.Home.OutputFormats.Get "json" }} {{- warnf "UNSUPPORTED usage of 'json' output format found, use 'search' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }} @@ -17,7 +17,7 @@ {{- if not .Site.Params.disableSearchPage }} {{- with .Site.GetPage "_relearn_searchpage" }} - {{- $link = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- $link = partial "permalink.gotmpl" (dict "to" .) }} {{- end }} {{- end }} {{- end }} @@ -35,7 +35,7 @@ {{- $missingcontentlangs := slice }} {{- range $contentlangs }} {{- $f := printf "/static/js/lunr/lunr.%s.min.js" . }} - {{- if partialCached "fileExists.hugo" $f $f }} + {{- if partialCached "_relearn/fileExists.gotmpl" $f $f }} {{- $quotedcontentlangs = $quotedcontentlangs | append (printf "'%s'" .) }} {{- else }} {{- $missingcontentlangs = $missingcontentlangs | append . }} diff --git a/layouts/partials/shortcodes/children.html b/layouts/partials/shortcodes/children.html index a7e96d66bd..b0b043948f 100644 --- a/layouts/partials/shortcodes/children.html +++ b/layouts/partials/shortcodes/children.html @@ -21,7 +21,7 @@ {{- with $page -}} {{ (printf "<%s class=\"children children-%s children-sort-%s\">" $containerstyle $style $sortTerm)|safeHTML }} - {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" . "by" $sortTerm) }} + {{- $pages := partial "_relearn/pages.gotmpl" (dict "page" . "by" $sortTerm) }} {{- template "childs" dict "menu" $pages "containerstyle" $containerstyle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm "page" . }} {{ (printf "" $containerstyle)|safeHTML }} {{- end }} @@ -35,11 +35,11 @@ {{- if hasPrefix $.style "h" }} {{- $num := sub ( int (trim $.style "h") ) 1 }} {{- $numn := add $num $.count }} -{{ (printf " " $numn)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }}{{ (printf "" $numn)|safeHTML }} +{{ (printf " " $numn)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }}{{ (printf "" $numn)|safeHTML }} {{- else if eq $.style "li" }} -{{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }} +{{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }} {{- else }} -{{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }}{{ (printf "" $.style)|safeHTML }} +{{ (printf " <%s>" $.style)|safeHTML }}{{ if .RelPermalink }}{{ .Title }}{{ else }}{{ .Title }}{{ end }}{{ (printf "" $.style)|safeHTML }} {{- end }} {{- if $.description }} {{- with or .Description .Summary -}} @@ -51,7 +51,7 @@ {{- if eq $.style "li" }} {{- (printf "<%s>" $.containerstyle)|safeHTML }} {{- end }} - {{- $pages := partial "pageHelper/pagesBy.html" (dict "page" . "by" $.sortTerm) }} + {{- $pages := partial "_relearn/pages.gotmpl" (dict "page" . "by" $.sortTerm) }} {{- template "childs" dict "menu" $pages "containerstyle" $.containerstyle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm "page" $page }} {{- if eq $.style "li" }} {{- (printf "" $.containerstyle)|safeHTML }} diff --git a/layouts/partials/shortcodes/expand.html b/layouts/partials/shortcodes/expand.html index bb4632eedc..8ba0dc17ee 100644 --- a/layouts/partials/shortcodes/expand.html +++ b/layouts/partials/shortcodes/expand.html @@ -18,7 +18,7 @@ {{- if eq (printf "%T" $expanded) "string" }} {{- $expanded = (eq $expanded "true") }} {{- end }} -{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} +{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "_relearn/makeRandomMd5.gotmpl" $page) .id }} {{- with $page }} {{- if $hasContent -}}
    diff --git a/layouts/partials/shortcodes/image.html b/layouts/partials/shortcodes/image.html index 768f9d6bce..a1ff1fef5a 100644 --- a/layouts/partials/shortcodes/image.html +++ b/layouts/partials/shortcodes/image.html @@ -74,7 +74,7 @@ {{- $c := printf "%s%s" (cond $v "" "no") $k }} {{- $classes = $classes | append $c }} {{- end }} -{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} +{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "_relearn/makeRandomMd5.gotmpl" $page) .id }} {{- $attributes = merge $attributes (dict "alt" $alt "src" $src "title" ($title | transform.HTMLEscape)) }} {{- if $effects.lazy }} {{- $attributes = merge $attributes (dict "loading" "lazy") }} diff --git a/layouts/partials/shortcodes/link.html b/layouts/partials/shortcodes/link.html index dbeaa28d8a..334eba3f11 100644 --- a/layouts/partials/shortcodes/link.html +++ b/layouts/partials/shortcodes/link.html @@ -62,7 +62,7 @@ {{- end }} {{- $errorlevel := or $page.Params.link.errorlevel $page.Site.Params.link.errorlevel }} {{- with $linkPage }} - {{- $href = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} + {{- $href = partial "permalink.gotmpl" (dict "to" .) }} {{- with $u.RawQuery }} {{- $href = printf "%s?%s" $href . }} {{- end }} diff --git a/layouts/partials/shortcodes/notice.html b/layouts/partials/shortcodes/notice.html index bdb8e117f1..6299c25b80 100644 --- a/layouts/partials/shortcodes/notice.html +++ b/layouts/partials/shortcodes/notice.html @@ -31,7 +31,7 @@ {{- $expander = true }} {{- end }} {{- end }} -{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} +{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "_relearn/makeRandomMd5.gotmpl" $page) .id }} {{- $idattribute := "" }} {{- if $expander }} {{- $containerclass = $containerclass | append "expand-content" }} diff --git a/layouts/partials/shortcodes/openapi.html b/layouts/partials/shortcodes/openapi.html index d9a8f1053b..0fed77941b 100644 --- a/layouts/partials/shortcodes/openapi.html +++ b/layouts/partials/shortcodes/openapi.html @@ -6,7 +6,7 @@ {{- $u := urls.Parse .src }} {{- $src := $u.String }} {{- $spec := "" }} -{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} +{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "_relearn/makeRandomMd5.gotmpl" $page) .id }} {{- if not $u.IsAbs }} {{- $path := strings.TrimPrefix "./" $u.Path }} {{- with or diff --git a/layouts/partials/shortcodes/tabs.html b/layouts/partials/shortcodes/tabs.html index 8d5ff74ecd..edcba91dbd 100644 --- a/layouts/partials/shortcodes/tabs.html +++ b/layouts/partials/shortcodes/tabs.html @@ -3,7 +3,7 @@ {{- $page = .context }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'tabs' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }} {{- end }} -{{- $groupid := .groupid | default (partial "make-random-md5.hugo" $page) | plainify | anchorize }} +{{- $groupid := .groupid | default (partial "_relearn/makeRandomMd5.gotmpl" $page) | plainify | anchorize }} {{- $color := .color }} {{- $style := .style }} {{- $title := .title }} diff --git a/layouts/partials/stylesheet.html b/layouts/partials/stylesheet.html index 63bacfa418..b6abdafaf5 100644 --- a/layouts/partials/stylesheet.html +++ b/layouts/partials/stylesheet.html @@ -4,7 +4,7 @@ {{- else }} {{- warnf "WARNING no key `relearnOutputFormat` found in page store, set one by providing the file `layouts/_default/view/storeOutputFormat..html` for your self-defined output format; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }} {{- end }} - {{- $assetBusting := partialCached "assetbusting.hugo" . }} + {{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }} {{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}} @@ -12,7 +12,7 @@ - {{- $themevariants := partialCached "get-theme-variants.hugo" . }} + {{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" . }} {{- with index $themevariants 0 }} @@ -20,14 +20,14 @@ {{- $f := printf "/static/css/format-%s.css" $outputFormat }} - {{- if or (partialCached "fileExists.hugo" $f $f) (resources.Get (printf "/css/format-%s.css" $outputFormat)) }} + {{- if or (partialCached "_relearn/fileExists.gotmpl" $f $f) (resources.Get (printf "/css/format-%s.css" $outputFormat)) }} {{- end }}