1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 08:15:32 -04:00

cache some partials

This commit is contained in:
2019-12-26 22:06:04 -05:00
parent e10e0e718a
commit ef32f73372
12 changed files with 52 additions and 43 deletions

View File

@@ -5,11 +5,11 @@
{{ partial "head" . }}
</head>
<body>
{{ partial "header" . }}
{{ partialCached "header" . }}
<div id="wrap">
{{ block "main" . }}{{ end }}
</div>
{{ partial "footer" . }}
{{ partialCached "footer" . }}
{{ partial "scripts" . }}
</body>
</html>

View File

@@ -12,7 +12,7 @@
<title>{{ .Title }} &ndash; {{ .Site.Title }}</title>
{{ with .OutputFormats.Get "html" }}<link rel="canonical" href="{{ .Permalink }}">{{ end }}
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta name="author" content="{{ .Site.Author.name }}">
{{ partial "open-graph" . }}
@@ -177,7 +177,7 @@
<header>
<nav>
<a id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
{{ partial "logo" . }}
{{ partialCached "logo" . }}
<span id="name">{{ .Site.Title }}</span>
</a>
@@ -196,7 +196,7 @@
on <a class="date" href="{{ (.OutputFormats.Get "html").Permalink }}">{{ .Date.Format "January 2, 2006" }}</a>
</p>
{{ .Page.RenderString .Content }}
{{ .Content | .Page.RenderString }}
</article>
<footer>

View File

@@ -15,7 +15,7 @@
</div>
</div>
<div id="content">
{{ .Page.RenderString .Content }}
{{ .Content | .Page.RenderString }}
</div>
</article>
</main>