Skip to content

Commit 828feb9

Browse files
committed
feat: implement comments, cookie banner, and improved sharing features
- Replaced share buttons with reusable `icon.html` partial. - Added comments section utilizing Utterances for discussions. - Introduced cookie banner and preferences modal with consent handling. - Enhanced post footer with tags and sharing links using new partials. - Included a new privacy notice for transparency on cookies and analytics.
1 parent 6e15377 commit 828feb9

20 files changed

Lines changed: 835 additions & 217 deletions

File tree

content/over-mij/index.html

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,7 @@ <h1 class="text-3xl font-semibold text-slate-900 dark:text-slate-100">Maarten Ca
2828
target="_blank"
2929
rel="noopener"
3030
>
31-
<svg
32-
xmlns="http://www.w3.org/2000/svg"
33-
class="h-5 w-5"
34-
width="24"
35-
height="24"
36-
viewBox="0 0 24 24"
37-
fill="none"
38-
stroke="currentColor"
39-
stroke-width="1.25"
40-
stroke-linecap="round"
41-
stroke-linejoin="round"
42-
aria-hidden="true"
43-
focusable="false"
44-
>
45-
<path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" />
46-
</svg>
31+
{{< icon name="github" class="h-5 w-5" size="24" >}}
4732
<span>GitHub</span>
4833
</a>
4934

@@ -53,26 +38,7 @@ <h1 class="text-3xl font-semibold text-slate-900 dark:text-slate-100">Maarten Ca
5338
target="_blank"
5439
rel="noopener"
5540
>
56-
<svg
57-
xmlns="http://www.w3.org/2000/svg"
58-
class="h-5 w-5"
59-
width="24"
60-
height="24"
61-
viewBox="0 0 24 24"
62-
fill="none"
63-
stroke="currentColor"
64-
stroke-width="1.25"
65-
stroke-linecap="round"
66-
stroke-linejoin="round"
67-
aria-hidden="true"
68-
focusable="false"
69-
>
70-
<path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" />
71-
<path d="M8 11l0 5" />
72-
<path d="M8 8l0 .01" />
73-
<path d="M12 16l0 -5" />
74-
<path d="M16 16v-3a2 2 0 0 0 -4 0" />
75-
</svg>
41+
{{< icon name="linkedin" class="h-5 w-5" size="24" >}}
7642
<span>LinkedIn</span>
7743
</a>
7844

@@ -82,22 +48,7 @@ <h1 class="text-3xl font-semibold text-slate-900 dark:text-slate-100">Maarten Ca
8248
target="_blank"
8349
rel="noopener"
8450
>
85-
<svg
86-
xmlns="http://www.w3.org/2000/svg"
87-
class="h-5 w-5"
88-
width="24"
89-
height="24"
90-
viewBox="0 0 24 24"
91-
fill="none"
92-
stroke="currentColor"
93-
stroke-width="1.25"
94-
stroke-linecap="round"
95-
stroke-linejoin="round"
96-
aria-hidden="true"
97-
focusable="false"
98-
>
99-
<path d="M6.335 5.144c-1.654 -1.199 -4.335 -2.127 -4.335 .826c0 .59 .35 4.953 .556 5.661c.713 2.463 3.13 2.75 5.444 2.369c-4.045 .665 -4.889 3.208 -2.667 5.41c1.03 1.018 1.913 1.59 2.667 1.59c2 0 3.134 -2.769 3.5 -3.5c.333 -.667 .5 -1.167 .5 -1.5c0 .333 .167 .833 .5 1.5c.366 .731 1.5 3.5 3.5 3.5c.754 0 1.637 -.571 2.667 -1.59c2.222 -2.203 1.378 -4.746 -2.667 -5.41c2.314 .38 4.73 .094 5.444 -2.369c.206 -.708 .556 -5.072 .556 -5.661c0 -2.953 -2.68 -2.025 -4.335 -.826c-2.293 1.662 -4.76 5.048 -5.665 6.856c-.905 -1.808 -3.372 -5.194 -5.665 -6.856z" />
100-
</svg>
51+
{{< icon name="bluesky" class="h-5 w-5" size="24" >}}
10152
<span>Bluesky</span>
10253
</a>
10354
</nav>
@@ -146,6 +97,9 @@ <h3 class="text-lg font-semibold text-slate-900 dark:text-slate-100">Deze blog</
14697
Dit is mijn plek om kennis te delen en te blijven bijleren. Ik schrijf vooral informatief, soms met een mening, altijd vanuit de praktijk.
14798
Als een post nuttig is voor iemand anders, dan is ze geslaagd.
14899
</p>
100+
<p class="text-base leading-relaxed">
101+
Naast deze blog ben ik ook co-host van de podcast <a class="text-moss underline-offset-4 transition hover:text-moss hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-moss/70 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-50 dark:text-mustard dark:hover:text-mustard dark:focus-visible:ring-moss/70 dark:focus-visible:ring-offset-slate-950" href="https://jcast.dev/" target="_blank" rel="noopener noreferrer">JCast</a>, waarbij Java het startpunt is en de rest de speeltuin.
102+
</p>
149103
</section>
150104

151105
<section class="space-y-3">

content/privacy/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "Privacy & cookies"
3+
description: "Hoe deze site cookies en privacy behandelt."
4+
---
5+
6+
Ik hou het graag eenvoudig. Deze site gebruikt zo weinig mogelijk cookies en data.
7+
8+
## Noodzakelijke cookies
9+
10+
De site slaat enkel een paar basisvoorkeuren op, zoals je gekozen thema (licht of donker). Dit is nodig om de site goed te laten werken en jouw keuze te onthouden.
11+
12+
## Analytics cookies (Google Analytics 4)
13+
14+
Alleen als jij toestemming geeft, laad ik Google Analytics 4. Daarmee meet ik anoniem welke pagina’s populair zijn zodat ik betere content kan maken. Zonder toestemming wordt er niets geladen.
15+
16+
## Je voorkeuren aanpassen
17+
18+
Je kan je keuze op elk moment aanpassen via de link **Cookievoorkeuren** in de footer.

hugo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ tagline = "Eerlijke inzichten over software en automatisatie"
1212
author = "Maarten Casteels"
1313
avatar = "/maarten.webp"
1414

15+
[params.person]
16+
name = "Maarten Casteels"
17+
url = "https://casteels.dev"
18+
image = "/maarten.webp"
19+
sameAs = [
20+
"https://jcast.dev/",
21+
"https://github.com/denmette",
22+
"https://www.linkedin.com/in/maartencasteels",
23+
"https://bsky.app/profile/casteels.dev",
24+
"https://denmette.be/",
25+
"https://x.com/denmette"
26+
]
27+
28+
[params.comments]
29+
repo = "denmette/denmette.github.io"
30+
issueTerm = "og:title"
31+
label = "comments"
32+
1533
languageCode = "nl-be"
1634
defaultContentLanguage = "nl"
1735

infra/cloudfront.tf

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,47 @@
22
# All AWS Cloudfront related stuff
33
##
44

5+
locals {
6+
csp_default_src = ["'self'"]
7+
csp_script_src_allow = [
8+
"'self'",
9+
"'unsafe-inline'",
10+
"https://casteels.dev",
11+
"https://utteranc.es",
12+
"https://www.googletagmanager.com",
13+
"https://www.google-analytics.com"
14+
]
15+
csp_style_src_allow = [
16+
"'self'",
17+
"'unsafe-inline'",
18+
"https://casteels.dev"
19+
]
20+
csp_img_src_allow = [
21+
"'self'",
22+
"https://casteels.dev",
23+
"https://www.google-analytics.com",
24+
"data:"
25+
]
26+
csp_frame_src_allow = [
27+
"'self'",
28+
"https://utteranc.es"
29+
]
30+
csp_connect_src_allow = [
31+
"'self'",
32+
"https://api.github.com",
33+
"https://www.google-analytics.com"
34+
]
35+
csp_directives = [
36+
"default-src ${join(" ", local.csp_default_src)}",
37+
"script-src ${join(" ", local.csp_script_src_allow)}",
38+
"style-src ${join(" ", local.csp_style_src_allow)}",
39+
"img-src ${join(" ", local.csp_img_src_allow)}",
40+
"frame-src ${join(" ", local.csp_frame_src_allow)}",
41+
"connect-src ${join(" ", local.csp_connect_src_allow)}"
42+
]
43+
csp_value = "${join("; ", local.csp_directives)};"
44+
}
45+
546
resource "aws_cloudfront_origin_access_control" "default" {
647
name = "casteels-dev OAC"
748
description = "Origin Access Control for S3 bucket"
@@ -180,7 +221,7 @@ resource "aws_cloudfront_response_headers_policy" "response_headers_policy" {
180221
content_security_policy {
181222
override = true
182223
# content_security_policy = "default-src 'self';"
183-
content_security_policy = "default-src 'self'; script-src 'self' 'unsafe-inline' https://casteels.dev; style-src 'self' 'unsafe-inline' https://casteels.dev; img-src 'self' https://casteels.dev data:;"
224+
content_security_policy = local.csp_value
184225
}
185226

186227
content_type_options {

layouts/over-mij/single.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ define "main" }}
2+
<article class="space-y-4 text-slate-800 dark:text-slate-100">
3+
{{ .Content }}
4+
</article>
5+
{{ end }}

0 commit comments

Comments
 (0)