Skip to content

Commit

Permalink
add umami link
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroelfs committed Feb 19, 2024
1 parent 640cd28 commit eae62b1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<meta name="description" content="{{ if .IsPage }}{{ .Site.BaseURL }}{{ else }}{{ .Site.Params.description }}{{ end }}">
{{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }}

<meta property="og:site_name" content="{{ .Site.Title }}">
<meta property="og:title" content="{{ block "og-title" . }}{{ .Site.Title }}{{ end }}">
<meta property="og:description" content="{{ if .IsPage }}{{ .Params.description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ if .IsPage }}{{ .Site.BaseURL }}{{ .Params.thumbnail }}{{ else }}{{ .Site.BaseURL }}{{ .Site.Params.favicon }}{{ end }}">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{ .Permalink }}">
<meta name="twitter:image" content="{{ if .IsPage }}{{ .Site.BaseURL }}{{ .Params.thumbnail }}{{ else }}{{ .Site.BaseURL }}{{ .Site.Params.favicon }}{{ end }}">

{{ $stylesheet := "css/style.css" }}
<link rel="stylesheet" type="text/css" href="{{ $stylesheet | absURL }}">

<!-- Custom css -->
{{ range .Site.Params.customcss }}
{{ $style := resources.Get . }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}">
{{ end }}

<link rel="stylesheet" href="https://use.typekit.net/jxt2fnp.css"> <!-- Source Serif 4-->
<link rel="stylesheet" href="https://use.typekit.net/uwd7war.css"> <!-- Source Code -->
<link href="https://fonts.cdnfonts.com/css/cooper-hewitt" rel="stylesheet">

{{ if .Site.Params.description }}
<meta name="description" content="{{ .Site.Params.description }}">
{{ end }}

{{ if .Site.Params.favicon }}
{{ with .Site.Params.favicon }}
<link rel="shortcut icon" href="{{ . | relURL }}">
{{ end }}
{{ end }}

<script async src="https://web-analytics.danielroelfs.app/script.js" data-website-id="10185115-89df-427f-9aea-8c3575857825"></script>
{{ if and .Site.Params.umami (not .Site.IsServer) }}
<script async src="{{ .Site.Params.umamilink }}" data-website-id="{{ .Site.Params.umamiid }}"></script>
{{ end }}

{{ $title := print .Title " | " .Site.Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ lower $title }}</title>
</head>
2 changes: 1 addition & 1 deletion themes/typography

0 comments on commit eae62b1

Please sign in to comment.