diff options
author | Olivier Roques <ojroques@users.noreply.github.com> | 2023-05-23 21:22:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 21:22:24 +0200 |
commit | 2fedeefb4506d0a6f6fd3f6629bd1ce0b09805be (patch) | |
tree | 4e98671141097ebd2f19f8e6cbb0bac83af3af92 /layouts/partials/head.html | |
parent | bbc9b60f3ac541d1661f7447e1568d76c419d4f9 (diff) | |
parent | 602e533fb26a941078db16921e8400853ba94d30 (diff) |
Merge pull request #34 from FraBle/master
Add support for cookie consent with Google Analytics 4
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r-- | layouts/partials/head.html | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f01e36b..88ba7ea 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -7,26 +7,24 @@ <meta name="author" content='{{ .Site.Params.author }}'> <link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous"> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css"> - - {{ $style := resources.Get "sass/researcher.scss" | resources.ExecuteAsTemplate "sass/researcher.scss" . | toCSS | minify }} + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css" integrity="sha512-rt/SrQ4UNIaGfDyEXZtNcyWvQeOq0QLygHluFQcSjaGB04IxWhal71tKuzP6K8eYXYB6vJV4pHkXcmFGGQ1/0w==" crossorigin="anonymous" referrerpolicy="no-referrer" /> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.3/css/academicons.min.css" integrity="sha512-vaoopdl+FJahyY2ddhsbDj8yDiRuyUYH/vIjF3z+cBg0sKc07NAQmUYli8volCGlW9OwlQyjVsr7Lh6qAManlw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> + {{ $style := resources.Get "sass/researcher.scss" | resources.ExecuteAsTemplate "sass/researcher.scss" . | toCSS | minify -}} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> - - {{ with .Site.Params.favicon }} - <link rel="icon" type="image/ico" href="{{ . | absURL }}"> - {{ end }} + {{ with .Site.Params.favicon -}} + <link rel="icon" type="image/ico" href="{{ . | absURL }}"> + {{ end -}} {{ with .OutputFormats.Get "rss" -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} - {{ if not .Site.IsServer }} - {{ template "_internal/google_analytics.html" . }} - {{ end }} + {{- if not .Site.IsServer -}} + {{- partial "googleanalytics.html" . -}} + {{- end -}} - {{ if .Params.noindex }} - <meta name="robots" content="noindex"> - {{ end }} + {{ if .Params.noindex -}} + <meta name="robots" content="noindex"> + {{ end -}} </head> |