Skip to content

Commit

Permalink
Merge pull request #56 from Genez-io/feat/blog
Browse files Browse the repository at this point in the history
meta tags
  • Loading branch information
Tudor-Ang authored Jan 17, 2024
2 parents bff9def + 0d43944 commit 3e4cc8c
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 1 deletion.
93 changes: 93 additions & 0 deletions themes/genezio-theme/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,98 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<!-- Google Tag Manager -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-5ZPQL3Z");
</script>
<!-- End Google Tag Manager -->
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>
{{ .Site.Title }}{{ if ne .Params.title "genezio" }} | {{ with .Params.title }}{{ . }}{{ end
}}{{ end }}
</title>

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="theme-color"
content="{{ .Site.Params.primary_color }}"
media="(prefers-color-scheme: light)"
/>
<meta
name="theme-color"
content="{{ .Site.Params.primary_color }}"
media="(prefers-color-scheme: dark)"
/>

<!-- Favicon -->
<link rel="shortcut icon" href="{{ .Site.BaseURL }}favicon.png" />
<link
rel="apple-touch-icon"
sizes="120x120"
href="{{ .Site.BaseURL }}apple-touch-icon-120x120-precomposed.png"
/>
<link
rel="apple-touch-icon"
sizes="152x152"
href="{{ .Site.BaseURL }}apple-touch-icon-152x152-precomposed.png"
/>

<!-- Add canonical URL -->
{{ if .IsHome }}
<link rel="canonical" href="{{ .Site.BaseURL }}" />
{{ else }}
<link rel="canonical" href="{{ .Permalink }}" />
{{ end }}

<!-- Meta tags for homepage start -->
<meta name="description" content="{{ .Params.Description }}" />
<meta property="og:title" content="{{ .Params.Title }}" />
<meta property="og:description" content="{{ .Params.Description }}" />
<meta property="og:image" content="{{ .Params.meta_og_image }}" />
<meta property="og:url" content="{{ .Params.meta_og_url }}" />
<meta property="og:type" content="website" />

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@GenezioNetwork" />
<meta name="twitter:creator" content="@GenezioNetwork" />
<meta name="twitter:title" content="{{ .Params.Title }}" />
<meta name="twitter:description" content="{{ .Params.Description }}" />
<meta name="robots" content="index,follow" />

{{ block "meta_tags" . }}{{end}}

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VR905VXGKC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());

gtag("config", "G-VR905VXGKC");
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-11377331429"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "AW-11377331429");
</script>
</head>
{{- partial "head.html" . -}}
<body>
{{ if or .Params.customHeader (eq .Params.title "Tutorials") (eq .Params.title "News") (eq
Expand Down
19 changes: 18 additions & 1 deletion themes/genezio-theme/layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{{ define "main" }}
{{ define "meta_tags" }}
<script>
(function (h, o, t, j, a, r) {
h.hj =
h.hj ||
function () {
(h.hj.q = h.hj.q || []).push(arguments);
};
h._hjSettings = { hjid: 3329235, hjsv: 6 };
a = o.getElementsByTagName("head")[0];
r = o.createElement("script");
r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, "https://static.hotjar.com/c/hotjar-", ".js?sv=");
</script>

{{ end }} {{ define "main" }}

<div class="px-3 bg-dark">
<div
Expand Down

0 comments on commit 3e4cc8c

Please sign in to comment.