From cc8eee2d77ed495b90a6f2ec327e63fcba7e3fc4 Mon Sep 17 00:00:00 2001 From: Julian Stier Date: Thu, 12 Mar 2020 15:32:30 +0100 Subject: [PATCH] Adding possibility for custom body html injection outside of installed theme --- layouts/_default/baseof.html | 1 + layouts/index.html | 6 +----- layouts/partials/body/custom.html | 0 layouts/partials/footer.html | 6 ++++++ layouts/partials/footer/footer.html | 2 -- 5 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 layouts/partials/body/custom.html create mode 100644 layouts/partials/footer.html delete mode 100644 layouts/partials/footer/footer.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f0da4d0..cc6c0bc 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,6 +2,7 @@ {{ block "header" . }}{{ end }} + {{ partial "body/custom.html" . }} {{ partial "sidebar.html" . }}
{{ block "content" . }}{{ end }} diff --git a/layouts/index.html b/layouts/index.html index c1a00bb..4f011a6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -36,9 +36,5 @@ {{ end }} {{ define "footer" }} - {{ if .Site.GoogleAnalytics }} - - {{ template "_internal/google_analytics_async.html" . }} - {{ end }} - {{ partial "footer/font-awesome-js.html" . }} + {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/partials/body/custom.html b/layouts/partials/body/custom.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..f83aeac --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,6 @@ +{{ if .Site.GoogleAnalytics }} + + {{ template "_internal/google_analytics_async.html" . }} +{{ end }} +{{ partial "footer/font-awesome-js.html" . }} +{{ partial "footer/custom.html" . }} diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html deleted file mode 100644 index 115fed3..0000000 --- a/layouts/partials/footer/footer.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ partial "footer/font-awesome-js.html" . }} -{{ partial "footer/custom.html" . }}