💄 Add custom files support just enjoy by yourself.

This commit is contained in:
凡梦星尘
2022-09-10 21:41:33 +08:00
parent 2276aae127
commit df09cbe4c0
7 changed files with 128 additions and 2 deletions

View File

@@ -105,3 +105,8 @@
</div>
{{- end }}
{{- end }}
{{- $custom := .Scratch.Get "footer" }}
{{- if $custom }}
{{ partialCached $custom . }}
{{- end }}

View File

@@ -24,7 +24,7 @@
{{- if hugo.IsProduction }}
{{- $css = $css | minify | fingerprint }}
{{- end }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{- if .IsPage }}
<style type="text/css">
.post-footer, .flinks-list-footer hr:after {
@@ -32,4 +32,9 @@
}
</style>
{{- end }}
{{- $custom := .Scratch.Get "style" }}
{{- if $custom }}
<link rel="stylesheet" type="text/css" href="{{ $custom }}">
{{- end }}

View File

@@ -106,4 +106,10 @@
{{ $globalVars.Set "config" $config }}
{{ with .Site.Params.customFilePath }}
{{ range $k, $v := . }}
{{ $globalVars.Set $k $v }}
{{ end }}
{{ end }}
{{ return $globalVars.Values }}

View File

@@ -23,7 +23,12 @@
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
{{ partial "sidebar/overview" . }}
{{- partialCached "sidebar/overview.html" . -}}
{{- $custom := .Scratch.Get "sidebar" }}
{{- if $custom }}
{{ partialCached $custom . }}
{{- end }}
</div>
</div>
{{- if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}