From 17f06a76fb25727244ed345cd90c319fe409cf7c Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Wed, 18 Oct 2023 20:10:14 -0600 Subject: [PATCH 1/4] Added google analytics --- layouts/partials/header.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5798d93..9e4d495 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -11,6 +11,17 @@ + {{ with .Site.Params.google_analytics }} + + + + {{ end }} + {{ with .Site.Params.description }}{{ end }} {{ with .Site.Params.author }}{{ end }} {{ range .AlternativeOutputFormats -}} From 6ddd66c30e06b7b87df2cb2ae84f8fdef97cee0d Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Wed, 18 Oct 2023 20:10:23 -0600 Subject: [PATCH 2/4] Added SASS --- layouts/partials/stylesheets.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layouts/partials/stylesheets.html b/layouts/partials/stylesheets.html index e88163f..911908a 100644 --- a/layouts/partials/stylesheets.html +++ b/layouts/partials/stylesheets.html @@ -8,3 +8,8 @@ {{ $custom_css := resources.Get . | minify | fingerprint "sha512" }} {{ end }} + +{{ with .Site.Params.custom_sass }} +{{ $custom_sass := resources.Get . | resources.ToCSS | minify | fingerprint "sha512" }} + +{{ end }} From 358c900d29a8abcd1e62c8d24104dde21a048806 Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Wed, 18 Oct 2023 20:11:24 -0600 Subject: [PATCH 3/4] Added examples to the config file. --- exampleSite/config.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index c4cb0d4..0069de4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -12,7 +12,9 @@ description = 'Another fine responsive
site template freebie
crafted b startbuttonText = "Activate" startbuttonLink = "#" body_is_markdown = true +#google_analytics = "G-XXXXXXXXXX" #custom_css = "foo.css" +#custom_sass = "bar.scss" #images = ["path_to_social_image_for_link_previews.jpg"] [[params.menu.main]] From 60daefaf9ab65210c3d9906af2009434c84117b4 Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Thu, 19 Oct 2023 17:14:57 -0600 Subject: [PATCH 4/4] Using internal Google Analytics --- exampleSite/config.toml | 2 +- layouts/partials/header.html | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0069de4..a15b207 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,6 +4,7 @@ languageCode = "en-us" defaultContentLanguage = "en" paginate = "7" theme = "spectral" +#googleAnalytics = "G-XXXXXXXXXX" [params] fancyTitle = "Spectral" # title for frontpage, may include image @@ -12,7 +13,6 @@ description = 'Another fine responsive
site template freebie
crafted b startbuttonText = "Activate" startbuttonLink = "#" body_is_markdown = true -#google_analytics = "G-XXXXXXXXXX" #custom_css = "foo.css" #custom_sass = "bar.scss" #images = ["path_to_social_image_for_link_previews.jpg"] diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 9e4d495..6d80bb0 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -11,16 +11,7 @@ - {{ with .Site.Params.google_analytics }} - - - - {{ end }} + {{ template "_internal/google_analytics.html" . }} {{ with .Site.Params.description }}{{ end }} {{ with .Site.Params.author }}{{ end }}