diff --git a/src/components/.gitkeep b/src/components/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/images/.gitkeep b/src/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/index.astro b/src/pages/index.astro index 43da8b8..49418bf 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import Layout from "../layouts/Layout.astro"; +import Layout from "@layouts/Layout.astro"; const baseUrl = import.meta.env.BASE_URL; --- diff --git a/src/pages/posts/index.astro b/src/pages/posts/index.astro index af7444e..a6149de 100644 --- a/src/pages/posts/index.astro +++ b/src/pages/posts/index.astro @@ -1,5 +1,5 @@ --- -import Layout from "../../layouts/Layout.astro"; +import Layout from "@layouts/Layout.astro"; import { getCollection } from "astro:content"; const postEntries = await getCollection("posts", ({ data }) => { return import.meta.env.PROD ? data.draft !== true : true; diff --git a/tsconfig.json b/tsconfig.json index 0fc51d7..d5d15fa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,12 @@ { "extends": "astro/tsconfigs/strict", "compilerOptions": { - "strictNullChecks": true + "strictNullChecks": true, + "baseUrl": ".", + "paths": { + "@components/*": ["src/components/*"], + "@images/*": ["src/images/*"], + "@layouts/*": ["src/layouts/*"] + } } }