From fbae824150310495e087c7d76203541f79d5bf6d Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Mon, 20 Mar 2017 22:12:24 +0100 Subject: [PATCH] Moving scripts to partial. Adding cache buser to script file. Generate cache buster from /public and not /theme since theme path is not known. --- layouts/_default/baseof.html | 6 ++---- layouts/partials/meta.html | 4 ++-- layouts/partials/scripts.html | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 layouts/partials/scripts.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c4bb77a..8f3a9fe 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,8 +1,8 @@ + {{ block "title" . }}{{ .Site.Title }}{{ end }} - {{ partial "meta.html" . }} {{ block "meta" . }}{{ end }} @@ -27,8 +27,6 @@ {{ if .Site.Params.poweredby }}

Powered by Hugo

{{ end }} -{{ if .Site.Params.jquery }}{{ end }} -{{ if and .Site.Params.jquery .Site.Params.slicknav }}{{ end }} -{{ if .Site.Params.jquery }}{{ end }} +{{ partial "scripts.html" . }} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index f10c1fe..50f2131 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -1,10 +1,10 @@ - - {{ .Hugo.Generator }} + + {{ with .RSSLink }}{{ end }} {{ with .Site.Params.contact }}{{ end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..5d54c97 --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,3 @@ +{{ if .Site.Params.jquery }}{{ end }} +{{ if and .Site.Params.jquery .Site.Params.slicknav }}{{ end }} +{{ if .Site.Params.jquery }}{{ end }}