mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 06:22:03 +08:00
dependencies: fix HTML escape error for generated HTML #1086
This commit is contained in:
parent
523120f28e
commit
3e2dd237eb
@ -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 %}}
|
||||
|
||||
|
@ -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" . }}
|
||||
</head>
|
||||
<body class="mobile-support {{ with .Store.Get "relearnOutputFormat" }}{{ . }}{{ else }}html{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "permalink.gotmpl" (dict "to" .) }}">
|
||||
@ -84,7 +84,7 @@
|
||||
{{- with resources.Get "/js/perfect-scrollbar/perfect-scrollbar.min.js" }}
|
||||
<script src="{{ .RelPermalink }}{{ $assetBusting }}" defer></script>
|
||||
{{- end }}
|
||||
{{- partial "dependencies.gotmpl" (dict "page" . "location" "footer") }}
|
||||
{{- partial "dependencies.html" (dict "page" . "location" "footer") }}
|
||||
{{- with resources.Get "/js/theme.js" }}
|
||||
{{- $res := . }}
|
||||
{{- if $minify }}
|
||||
|
@ -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 }}
|
||||
{{- 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" . }}
|
@ -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" . }}
|
||||
{{- $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 }}
|
@ -1 +1 @@
|
||||
7.6.1+8a07ed3431ac0229008e095e00bae017403248fe
|
||||
7.6.1+523120f28eb07bf5707e343d07e79fe704ae1f38
|
Loading…
x
Reference in New Issue
Block a user