chore: new blog post and small patches (#3)

* wip: blog post on open source

* wip: initial draft of the blog post

* chore: remove sharing a blog post

* fix: broken style from previous commit

* chore: improve handling keywords
This commit is contained in:
2025-05-15 20:47:14 +01:00
committed by GitHub
parent 112393e189
commit eae27cb10e
10 changed files with 27 additions and 81 deletions
+2 -4
View File
@@ -2,7 +2,6 @@
{{ $partialsStyles := resources.Get "css/partials.css" | toCSS | minify }}
{{ $baseScripts := resources.Get "js/baseof.js" | js.Build | minify }}
{{ $mobileNavigationScripts := resources.Get "js/mobile-navigation.js" | js.Build | minify }}
{{ $contactFormScripts := resources.Get "js/contact-form.js" | js.Build | minify }}
{{ $androidChromeIcon := resources.Get "android-chrome-192x192.png" }}
{{ $appleTouchIcon := resources.Get "apple-touch-icon.png" }}
@@ -28,7 +27,7 @@
>
<meta
name="keywords"
content="{{ if .Params.keywords }}{{ .Params.keywords }}{{ else }}{{ .Site.Params.defaultKeywords }}{{ end }}"
content='{{ if .Params.Keywords }}{{ delimit .Params.Keywords ", " }}{{ else }}{{ delimit .Site.Params.defaultKeywords ", " }}{{ end }}'
>
<meta name="robots" content="index, follow">
<meta property="og:title" content="{{ .Page.Title }} | Hazem Krimi">
@@ -66,7 +65,6 @@
<script defer src="{{ $baseScripts.Permalink }}"></script>
<script defer src="{{ $mobileNavigationScripts.Permalink }}"></script>
<script defer src="{{ $contactFormScripts.Permalink }}"></script>
{{ block "scripts" . }}{{ end }}
</head>
<body>
@@ -80,4 +78,4 @@
{{ partial "footer.html" . }}
{{ template "_internal/google_analytics.html" . }}
</body>
</html>
</html>
-20
View File
@@ -14,15 +14,6 @@
<div>
<span>{{ readFile "assets/icons/calendar.svg" | safeHTML }} {{ .Date.Format .Site.Params.dateFormat }}</span>
<span>{{ readFile "assets/icons/clock.svg" | safeHTML }} {{ printf "%d minute(s) read" .ReadingTime }}</span>
<span
id="share"
data-title="{{ .Title }}"
data-description="{{ .Params.description }}"
data-url="{{ .Permalink }}"
>
{{ readFile "assets/icons/share.svg" | safeHTML }}
Share
</span>
</div>
</section>
@@ -35,15 +26,4 @@
{{ partial "table-of-contents.html" . }}
</div>
<script>
document.querySelector('#share').addEventListener('click', async event => {
await navigator.share({
title: event.target.getAttribute('data-title'),
description: event.target.getAttribute('data-description'),
url: event.target.getAttribute('data-url'),
});
});
</script>
{{ end }}