Moving scripts to partial. Adding cache buser to script file. Generate cache buster from /public and not /theme since theme path is not known.
This commit is contained in:
parent
2074a3a530
commit
fbae824150
2 changed files with 7 additions and 6 deletions
|
|
@ -1,10 +1,10 @@
|
|||
<meta charset="utf-8">
|
||||
<link rel="shortcut icon" href="{{ .Site.BaseURL }}favicon.ico" type="image/vnd.microsoft.icon">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes">
|
||||
<meta name="MobileOptimized" content="width">
|
||||
<meta name="HandheldFriendly" content="true">
|
||||
{{ .Hugo.Generator }}
|
||||
<link rel="stylesheet" href="/css/styles.css?{{ readFile "/public/css/styles.css" | sha1}}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="shortcut icon" href="{{ .Site.BaseURL }}favicon.ico" type="image/vnd.microsoft.icon">
|
||||
<link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.png">
|
||||
{{ with .RSSLink }}<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.contact }}<meta name="contact" content="{{ . }}">{{ end }}
|
||||
|
|
|
|||
3
layouts/partials/scripts.html
Normal file
3
layouts/partials/scripts.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{{ if .Site.Params.jquery }}<script src="/js/jquery.min.js"></script>{{ end }}
|
||||
{{ if and .Site.Params.jquery .Site.Params.slicknav }}<script src="/js/jquery.slicknav.min.js"></script>{{ end }}
|
||||
{{ if .Site.Params.jquery }}<script src="/js/script.js?{{ readFile "/public/js/script.js" | sha1}}"></script>{{ end }}
|
||||
Loading…
Reference in a new issue