Cache some partials

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-01-23 11:26:13 +05:30
parent 559d864097
commit 0499177010
3 changed files with 4 additions and 4 deletions

View File

@ -19,6 +19,6 @@
{{ if and .Site.Params.CommentoURL (and (not .Site.BuildDrafts) (not .Site.IsServer)) -}}
<h2>Comments</h2>
{{ partial "commento.html" . }}
{{ partialCached "commento.html" . }}
{{- end }}
{{- end }}

View File

@ -1,6 +1,6 @@
{{ partial "head.html" . }}
<body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
{{ partial "sidebar.html" . }}
{{ partialCached "sidebar.html" . }}
<main class="content container">
{{ block "main" . -}}{{- end }}
</main>

View File

@ -23,7 +23,7 @@
{{ $styles := slice $poole $hyde $syntax | resources.Concat "styles.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ printf "integrity=%q" $styles.Data.Integrity | safeHTMLAttr }}>
<link rel="stylesheet" href="{{ $print.RelPermalink }}" {{ printf "integrity=%q" $print.Data.Integrity | safeHTMLAttr }} media="print">
{{ partial "head_fonts.html" . }}
{{ partialCached "head_fonts.html" . }}
<!-- Icons -->
<link rel="shortcut icon" href="{{ .Site.BaseURL }}favicon-32x32.webp">
@ -33,5 +33,5 @@
{{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
{{ end -}}
{{ partial "hook_head_end.html" . }}
{{ partialCached "hook_head_end.html" . }}
</head>