Skip to content

Commit

Permalink
Merge pull request #30 from PrestonHager/dev
Browse files Browse the repository at this point in the history
Added Google Analytics and SASS
  • Loading branch information
dholbach authored Oct 20, 2023
2 parents 3640502 + 60daefa commit 53d5ac7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,6 +14,7 @@ startbuttonText = "Activate"
startbuttonLink = "#"
body_is_markdown = true
#custom_css = "foo.css"
#custom_sass = "bar.scss"
#images = ["path_to_social_image_for_link_previews.jpg"]

[[params.menu.main]]
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="origin">

{{ template "_internal/google_analytics.html" . }}

{{ with .Site.Params.description }}<meta name="description" content="{{ . | plainify }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{ range .AlternativeOutputFormats -}}
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/stylesheets.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@
{{ $custom_css := resources.Get . | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $custom_css.RelPermalink }}" integrity="{{ $custom_css.Data.Integrity }}">
{{ end }}

{{ with .Site.Params.custom_sass }}
{{ $custom_sass := resources.Get . | resources.ToCSS | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $custom_sass.RelPermalink }}" integrity="{{ $custom_sass.Data.Integrity }}">
{{ end }}

0 comments on commit 53d5ac7

Please sign in to comment.