From 89f19e25f8930723d7ac0883a0c5c4ca28ecdd76 Mon Sep 17 00:00:00 2001
From: kritzl
Date: Sat, 11 Jul 2026 08:36:41 +0200
Subject: [PATCH] fix path generation
---
src/pages/index.astro | 3 ++-
src/utils/path.ts | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
create mode 100644 src/utils/path.ts
diff --git a/src/pages/index.astro b/src/pages/index.astro
index da0d29d..abe49d7 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -2,6 +2,7 @@
import Footer from "../components/Footer.astro"
import Layout from "../layouts/Layout.astro"
import {Calendar, ChevronDown} from "@lucide/astro"
+import path from "../utils/path.ts"
---
@@ -66,7 +67,7 @@ import {Calendar, ChevronDown} from "@lucide/astro"
Office-Programm, oder die eigene Cloud.
Wenn ihr euch mit eurer Stadtteil-Initiative, Computer-Stammtisch oder
Aktivisty-Gruppe an den DIDAYS beteiligen möchtet, dann schaut
- doch in unsere Einladung an Gruppen.
+ doch in unsere Einladung an Gruppen.
Wir freuen uns auf die Zusammenarbeit!
diff --git a/src/utils/path.ts b/src/utils/path.ts
new file mode 100644
index 0000000..907a692
--- /dev/null
+++ b/src/utils/path.ts
@@ -0,0 +1,6 @@
+export default function path(...components: Array){
+ return '/' + components
+ .map(component => component.trim().replace(/(^[\/]*|[\/]*$)/g, ''))
+ .filter(component => component.length > 0)
+ .join("/")
+}
\ No newline at end of file