From af74892b689295da5e7b7617c6e1fa1164f78bb4 Mon Sep 17 00:00:00 2001 From: Cedric Ahlers <55838528+clowa@users.noreply.github.com> Date: Tue, 23 Dec 2025 11:15:43 +0000 Subject: [PATCH 1/4] refactor: add new @styles alias for consistent imports --- swa/src/layouts/BlogPost.astro | 3 ++- swa/src/layouts/Layout.astro | 2 +- swa/tsconfig.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/swa/src/layouts/BlogPost.astro b/swa/src/layouts/BlogPost.astro index 18a0630..24ad7a1 100644 --- a/swa/src/layouts/BlogPost.astro +++ b/swa/src/layouts/BlogPost.astro @@ -1,5 +1,6 @@ --- -import "../styles/base.css"; +// import BaseLayout from '@layouts/BaseLayout.astro'; +import "@styles/base.css"; import "remark-github-blockquote-alert/alert.css"; // 1. The frontmatter prop gives access to frontmatter and other data const { frontmatter } = Astro.props; diff --git a/swa/src/layouts/Layout.astro b/swa/src/layouts/Layout.astro index 39bc6d3..970b35b 100644 --- a/swa/src/layouts/Layout.astro +++ b/swa/src/layouts/Layout.astro @@ -1,5 +1,5 @@ --- -import "../styles/base.css"; +import "@styles/base.css"; interface Props { title: string; diff --git a/swa/tsconfig.json b/swa/tsconfig.json index 9d094ab..8943b45 100644 --- a/swa/tsconfig.json +++ b/swa/tsconfig.json @@ -13,7 +13,8 @@ "paths": { "@components/*": ["./src/components/*"], "@layouts/*": ["./src/layouts/*"], - "@scripts/*": ["./src/scripts/*"] + "@scripts/*": ["./src/scripts/*"], + "@styles/*": ["./src/styles/*"] } } } From fc9a2a84c6ae296926667969255b31e6e2cb3711 Mon Sep 17 00:00:00 2001 From: Cedric Ahlers <55838528+clowa@users.noreply.github.com> Date: Tue, 23 Dec 2025 11:21:22 +0000 Subject: [PATCH 2/4] refactor: renamed Layout.astro to BaseLayout.astro to point out it's purpose --- swa/src/layouts/{Layout.astro => BaseLayout.astro} | 2 +- swa/src/layouts/BlogPost.astro | 1 - swa/src/pages/404.astro | 6 +++--- swa/src/pages/index.astro | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) rename swa/src/layouts/{Layout.astro => BaseLayout.astro} (97%) diff --git a/swa/src/layouts/Layout.astro b/swa/src/layouts/BaseLayout.astro similarity index 97% rename from swa/src/layouts/Layout.astro rename to swa/src/layouts/BaseLayout.astro index 970b35b..39bc6d3 100644 --- a/swa/src/layouts/Layout.astro +++ b/swa/src/layouts/BaseLayout.astro @@ -1,5 +1,5 @@ --- -import "@styles/base.css"; +import "../styles/base.css"; interface Props { title: string; diff --git a/swa/src/layouts/BlogPost.astro b/swa/src/layouts/BlogPost.astro index 24ad7a1..afe38cd 100644 --- a/swa/src/layouts/BlogPost.astro +++ b/swa/src/layouts/BlogPost.astro @@ -1,5 +1,4 @@ --- -// import BaseLayout from '@layouts/BaseLayout.astro'; import "@styles/base.css"; import "remark-github-blockquote-alert/alert.css"; // 1. The frontmatter prop gives access to frontmatter and other data diff --git a/swa/src/pages/404.astro b/swa/src/pages/404.astro index f44507f..9b0a8d9 100644 --- a/swa/src/pages/404.astro +++ b/swa/src/pages/404.astro @@ -1,8 +1,8 @@ --- -import Layout from '@layouts/Layout.astro'; +import BaseLayout from '@layouts/BaseLayout.astro'; --- - +
@@ -14,7 +14,7 @@ import Layout from '@layouts/Layout.astro';

Hm, looks like this page doesn't exist ...

-
+