diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 005abd1..389de8f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,7 +7,7 @@ {{ .Title }} - {{ .Site.Title }} - {{ partial "head/conditional-css.html" . }} + {{ partial "head/conditional-assets.html" . }} {{ partial "head/bootstrap5.html" . }} {{ partial "head/blockquote.html" . }} {{ block "head" . }}{{ end }} @@ -19,8 +19,6 @@ {{ block "main" . }}{{ end }} {{ partial "footer/footer.html" . }} - {{ partial "foot/bootstrap5.html" . }} - {{ partial "foot/conditional-js.html" . }} diff --git a/layouts/partials/foot/bootstrap5.html b/layouts/partials/foot/bootstrap5.html deleted file mode 100644 index 22f03f5..0000000 --- a/layouts/partials/foot/bootstrap5.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/layouts/partials/head/bootstrap5.html b/layouts/partials/head/bootstrap5.html index 9a864c3..f43e4b7 100644 --- a/layouts/partials/head/bootstrap5.html +++ b/layouts/partials/head/bootstrap5.html @@ -2,4 +2,5 @@ - \ No newline at end of file + + diff --git a/layouts/partials/foot/conditional-js.html b/layouts/partials/head/conditional-assets.html similarity index 59% rename from layouts/partials/foot/conditional-js.html rename to layouts/partials/head/conditional-assets.html index 6e2fb73..781ab7b 100644 --- a/layouts/partials/foot/conditional-js.html +++ b/layouts/partials/head/conditional-assets.html @@ -1,6 +1,10 @@ +{{ if .HasShortcode "cfg" }} +{{ $block := resources.Get "css/cfg.css" }} + +{{ end }} {{ if .HasShortcode "gallery" }} - - + + {{ $block := resources.Get "js/gallery.js" }} - + {{ end }} \ No newline at end of file diff --git a/layouts/partials/head/conditional-css.html b/layouts/partials/head/conditional-css.html deleted file mode 100644 index 98e838c..0000000 --- a/layouts/partials/head/conditional-css.html +++ /dev/null @@ -1,4 +0,0 @@ -{{ if .HasShortcode "cfg" }} -{{ $block := resources.Get "css/cfg.css" }} - -{{ end }} \ No newline at end of file diff --git a/layouts/partials/head/conditional-js.html b/layouts/partials/head/conditional-js.html new file mode 100644 index 0000000..e69de29