diff --git a/docs/content/configuration/customization/extending/_index.en.md b/docs/content/configuration/customization/extending/_index.en.md index d11e552d6d..0e3828c7a5 100644 --- a/docs/content/configuration/customization/extending/_index.en.md +++ b/docs/content/configuration/customization/extending/_index.en.md @@ -66,7 +66,7 @@ See the `math`, `mermaid`, and `openapi` shortcodes for examples. For advanced customization, you can use the dependency loader in your own partials: ````go -{{- partial "dependencies.gotmpl" (dict "page" . "location" "mylocation") }} +{{- partial "dependencies.html" (dict "page" . "location" "mylocation") }} ```` {{% /notice %}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8fde950ba8..7375300143 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -37,7 +37,7 @@ {{- end }} {{- partialCached "favicon.html" . }} {{- partial "stylesheet.html" . }} - {{- partial "dependencies.gotmpl" (dict "page" . "location" "header") }} + {{- partial "dependencies.html" (dict "page" . "location" "header") }} {{- partial "custom-header.html" . }} @@ -84,7 +84,7 @@ {{- with resources.Get "/js/perfect-scrollbar/perfect-scrollbar.min.js" }} {{- end }} -{{- partial "dependencies.gotmpl" (dict "page" . "location" "footer") }} +{{- partial "dependencies.html" (dict "page" . "location" "footer") }} {{- with resources.Get "/js/theme.js" }} {{- $res := . }} {{- if $minify }} diff --git a/layouts/partials/dependencies.gotmpl b/layouts/partials/dependencies.gotmpl index 5342e0d295..f00528b717 100644 --- a/layouts/partials/dependencies.gotmpl +++ b/layouts/partials/dependencies.gotmpl @@ -1,17 +1,2 @@ -{{- $page := .page }} -{{- $location := .location }} -{{- partialCached "_relearn/dependencies.gotmpl" $page $page.Path }} -{{- range $k, $v := $page.Site.Params.relearn.dependencies }} - {{- $has := printf "has%s" $v.name }} - {{- $hasnested := printf "relearnHasNested%s" $v.name }} - {{- $wants := or ($page.Page.Store.Get $has) (and ($page.Page.Store.Get "relearnIsNested") ($page.Page.Store.Get $hasnested)) }} - {{- if and $wants }} - {{- if $v.location }} - {{- warnf "DEPRECATED parameter 'location' for dependency '%s' configured in your hugo.toml, query the 'location' parameter inside your dependency loader instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/5/#5-27-0" $k}} - {{- end }} - {{- if or (not $v.location) (eq $location $v.location) }} - {{- $dep := printf "dependencies/%s.html" $k }} - {{- partial $dep (dict "page" $page "location" $location) }} - {{- end }} - {{- end }} -{{- end }} \ No newline at end of file +{{- warnf "DEPRECATED partial 'dependencies.gotmpl' used, use 'dependencies.html' instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/7/#7-7-0" }} +{{- partial "dependencies.html" . }} \ No newline at end of file diff --git a/layouts/partials/dependencies.html b/layouts/partials/dependencies.html index 4c6cd9f989..5342e0d295 100644 --- a/layouts/partials/dependencies.html +++ b/layouts/partials/dependencies.html @@ -1,2 +1,17 @@ -{{- warnf "DEPRECATED partial 'dependencies.html' used, use 'dependencies.gotmpl' instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/7/#7-0-0" }} -{{- partial "dependencies.gotmpl" . }} \ No newline at end of file +{{- $page := .page }} +{{- $location := .location }} +{{- partialCached "_relearn/dependencies.gotmpl" $page $page.Path }} +{{- range $k, $v := $page.Site.Params.relearn.dependencies }} + {{- $has := printf "has%s" $v.name }} + {{- $hasnested := printf "relearnHasNested%s" $v.name }} + {{- $wants := or ($page.Page.Store.Get $has) (and ($page.Page.Store.Get "relearnIsNested") ($page.Page.Store.Get $hasnested)) }} + {{- if and $wants }} + {{- if $v.location }} + {{- warnf "DEPRECATED parameter 'location' for dependency '%s' configured in your hugo.toml, query the 'location' parameter inside your dependency loader instead; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/5/#5-27-0" $k}} + {{- end }} + {{- if or (not $v.location) (eq $location $v.location) }} + {{- $dep := printf "dependencies/%s.html" $k }} + {{- partial $dep (dict "page" $page "location" $location) }} + {{- end }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index c141f33fa7..55a747d256 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.6.1+8a07ed3431ac0229008e095e00bae017403248fe \ No newline at end of file +7.6.1+523120f28eb07bf5707e343d07e79fe704ae1f38 \ No newline at end of file