Skip to content

Commit

Permalink
adding google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
crmejia committed Dec 27, 2023
1 parent 6f95ec6 commit 2758b90
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 42 deletions.
4 changes: 4 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ theme = "paperesque"
[[params.topmenu]]
name = "consulting"
url = "consulting/"

[services]
[services.googleAnalytics]
ID = 'G-CDK4087KM8'
85 changes: 43 additions & 42 deletions themes/paperesque/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
<!DOCTYPE html>
<html
lang="{{ .Site.LanguageCode }}"
prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"
>
<head>
<meta charset="utf-8" />

{{ partial "meta.html" . }}

<title>{{ .Title }}{{ if not .IsHome }} || {{ $.Site.Title }}{{ end }}</title>
<link rel="canonical" href="{{ .Permalink }}" />

{{ with .Site.Params.RSSCanonicalLink }}
<link rel="alternate" type="application/rss+xml" href="{{ . | absURL }}" title="{{$.Site.Title}}" />
{{ else }}
{{- with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end -}}
{{ end }}

{{ partial "head_includes.html" . }}
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
</head>
<body
class="{{ block "body-classes" . }}{{ end }}"
lang="{{ .Site.LanguageCode }}">
<html lang="{{ .Site.LanguageCode }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

<head>
<meta charset="utf-8" />

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

{{ partial "meta.html" . }}

<title>{{ .Title }}{{ if not .IsHome }} || {{ $.Site.Title }}{{ end }}</title>
<link rel="canonical" href="{{ .Permalink }}" />

{{ with .Site.Params.RSSCanonicalLink }}
<link rel="alternate" type="application/rss+xml" href="{{ . | absURL }}" title="{{$.Site.Title}}" />
{{ else }}
{{- with .OutputFormats.Get "rss" -}}
{{ printf `
<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{- end -}}
{{ end }}

{{ partial "head_includes.html" . }}
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
</head>

<body class="{{ block " body-classes" . }}{{ end }}" lang="{{ .Site.LanguageCode }}">
<div class="navbar nav-bkg drop-shadow">
<nav class="content-container pagewide-bar-padding">
<span class="divider">/ </span>
<a href="{{ .Site.Home.RelPermalink }}" >{{ .Site.Title }}</a>
<a href="{{ .Site.Home.RelPermalink }}">{{ .Site.Title }}</a>
{{ block "breadcrumbs" . }}
{{- with .Parent -}}
{{- if not .IsHome -}}
<span class="divider">/ </span>
<a href="{{ .RelPermalink }}">
{{- with .Params.breadcrumb_label -}}
{{- . -}}
{{- else -}}
{{- .Title -}}
{{- end -}}
</a>
{{- end -}}
{{- with .Parent -}}
{{- if not .IsHome -}}
<span class="divider">/ </span>
<a href="{{ .RelPermalink }}">
{{- with .Params.breadcrumb_label -}}
{{- . -}}
{{- else -}}
{{- .Title -}}
{{- end -}}
</a>
{{- end -}}
{{- end -}}
{{ end }}
{{ partial "right-links" . }}
</nav>
</div>
{{ block "content" . }}{{ end }}
{{ if not .Params.hide_footer }}
{{ block "footer" . }}{{ end }}
{{ block "footer" . }}{{ end }}
{{ end }}
</body>
</html>
</body>

</html>

0 comments on commit 2758b90

Please sign in to comment.