Move meta and script tags that need cached to *_cached partials.

This commit is contained in:
Fredrik Jonsson 2017-06-25 17:59:53 +02:00
commit 2bcf1168c8
4 changed files with 9 additions and 6 deletions

View file

@ -3,5 +3,5 @@
<meta name="HandheldFriendly" content="true">
{{ .Hugo.Generator }}
{{ with $.Param "contact" }}<meta name="contact" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="/css/styles.css{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">

View file

@ -0,0 +1 @@
<link rel="stylesheet" href="/css/styles.css{{ if $.Param "cacheBustCSS" }}?{{ readFile "/public/css/styles.css" | sha1 }}{{ end }}">

View file

@ -1,3 +1,2 @@
{{ if $.Param "jquery" }}<script src="/js/jquery.min.js"></script>{{ end }}
{{ if and ($.Param "jquery") ($.Param "slicknav") }}<script src="/js/jquery.slicknav.min.js"></script>{{ end }}
{{ if $.Param "jquery" }}<script src="/js/script.js{{ if $.Param "cacheBustJS" }}?{{ readFile "/public/js/script.js" | sha1 }}{{ end }}"></script>{{ end }}

View file

@ -0,0 +1 @@
{{ if $.Param "jquery" }}<script src="/js/script.js{{ if $.Param "cacheBustJS" }}?{{ readFile "/public/js/script.js" | sha1 }}{{ end }}"></script>{{ end }}