diff --git a/astro.config.mjs b/astro.config.mjs index f668622f..ffe3644d 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,6 +7,13 @@ import sitemap from "@astrojs/sitemap"; export default defineConfig({ site: "https://austinabbott.dev", integrations: [mdx(), sitemap()], + markdown: { + shikiConfig: { + // Light and dark code colors; global.css picks one based on the theme toggle. + themes: { light: "github-light", dark: "github-dark" }, + defaultColor: false, + }, + }, image: { service: { entrypoint: "astro/assets/services/sharp", diff --git a/bun.lock b/bun.lock index 4077bc04..2bc3a699 100644 --- a/bun.lock +++ b/bun.lock @@ -9,6 +9,8 @@ "@astrojs/mdx": "^8.0.0", "@astrojs/rss": "^4.0.12", "@astrojs/sitemap": "^3.6.0", + "@fontsource-variable/inter": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", "astro": "^7.0.0", "typescript": "^6.0.0", }, @@ -124,6 +126,10 @@ "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g=="], + "@fontsource-variable/inter": ["@fontsource-variable/inter@5.3.0", "", {}, "sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA=="], + + "@fontsource-variable/jetbrains-mono": ["@fontsource-variable/jetbrains-mono@5.3.0", "", {}, "sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw=="], + "@img/colour": ["@img/colour@1.1.0", "", {}, "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ=="], "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.35.5", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.3.4" }, "os": "darwin", "cpu": "arm64" }, "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg=="], diff --git a/package.json b/package.json index 739e4efc..4fd6d996 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "@astrojs/mdx": "^8.0.0", "@astrojs/rss": "^4.0.12", "@astrojs/sitemap": "^3.6.0", + "@fontsource-variable/inter": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", "astro": "^7.0.0", "typescript": "^6.0.0" } diff --git a/public/fonts/atkinson-bold.woff b/public/fonts/atkinson-bold.woff deleted file mode 100644 index e7f8977e..00000000 Binary files a/public/fonts/atkinson-bold.woff and /dev/null differ diff --git a/public/fonts/atkinson-regular.woff b/public/fonts/atkinson-regular.woff deleted file mode 100644 index bbe09c58..00000000 Binary files a/public/fonts/atkinson-regular.woff and /dev/null differ diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index e0e5960b..a5677e97 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -2,6 +2,8 @@ // Import the global.css file here so that it is included on // all pages through the use of the component. import { ClientRouter } from "astro:transitions"; +import "@fontsource-variable/inter"; +import "@fontsource-variable/jetbrains-mono"; import "../styles/global.css"; interface Props { @@ -21,22 +23,6 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props; - - - - diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 5e4bf385..46c1a391 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -3,89 +3,55 @@ const today = new Date(); --- diff --git a/src/components/Header.astro b/src/components/Header.astro index 90a95ddc..3dedb88f 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -5,26 +5,24 @@ import ThemeToggle from "./ThemeToggle.astro";
@@ -76,84 +73,75 @@ import ThemeToggle from "./ThemeToggle.astro"; diff --git a/src/components/HeaderLink.astro b/src/components/HeaderLink.astro index 4854e66f..6cf58913 100644 --- a/src/components/HeaderLink.astro +++ b/src/components/HeaderLink.astro @@ -19,10 +19,14 @@ const isActive = href === pathname || href === "/" + subpath?.[0]; diff --git a/src/components/ThemeToggle.astro b/src/components/ThemeToggle.astro index 1f773b30..049331af 100644 --- a/src/components/ThemeToggle.astro +++ b/src/components/ThemeToggle.astro @@ -3,8 +3,8 @@ @@ -66,38 +57,36 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
-
-
+
+
+ { - heroImage && ( - {`Header + updatedDate && ( + + ยท Updated + ) }
-
-
-
-
- - { - updatedDate && ( -
- Last updated on -
- ) - } +

{title}

+

{description}

+
+ { + heroImage && ( +
+ {`Header
-

{title}

-
- + ) + } +
diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 4a032042..1c95b86e 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,12 +1,10 @@ --- import { getCollection } from "astro:content"; -import { Image } from "astro:assets"; import { SITE_TITLE, SITE_DESCRIPTION } from "../../consts"; import BaseHead from "../../components/BaseHead.astro"; import Footer from "../../components/Footer.astro"; import FormattedDate from "../../components/FormattedDate.astro"; import Header from "../../components/Header.astro"; -import { getImageFromLibrary } from "../../utils"; const posts = (await getCollection("blog")).sort( (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf() @@ -19,105 +17,36 @@ const posts = (await getCollection("blog")).sort(
-
- -
+

Blog

+

{SITE_DESCRIPTION}.

+
    + { + posts.map((post) => ( +
  • + +
    + {post.data.title} + {post.data.description} +
    +
  • + )) + } +