diff --git a/astro.config.ts b/astro.config.ts index 724676b..1c05c1e 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -5,10 +5,29 @@ import mdx from "@astrojs/mdx"; import tailwind from "@astrojs/tailwind"; import icon from "astro-icon"; +import expressiveCode from "astro-expressive-code"; + // https://astro.build/config export default defineConfig({ site: "https://troylusty.com", - integrations: [sitemap(), mdx(), tailwind(), icon()], + integrations: [ + sitemap(), + expressiveCode({ + themes: ["github-dark-default", "github-light-default"], + defaultProps: { + frame: "none", + wrap: true, + }, + styleOverrides: { + frames: { + shadowColor: "none", + }, + }, + }), + mdx(), + tailwind(), + icon(), + ], output: "static", markdown: { rehypePlugins: [ @@ -19,17 +38,10 @@ export default defineConfig({ }, ], ], - shikiConfig: { - wrap: true, - }, - syntaxHighlight: false, }, image: { service: passthroughImageService(), }, - build: { - inlineStylesheets: "never", - }, experimental: { responsiveImages: true, }, diff --git a/bun.lockb b/bun.lockb index a3bac85..2ce6b4f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index b943b07..0b0ea20 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@fontsource-variable/red-hat-mono": "^5.1.1", "@fontsource/borel": "^5.1.1", "astro": "^5.1.7", + "astro-expressive-code": "^0.40.1", "astro-icon": "^1.1.5", "rehype-external-links": "^3.0.0", "tailwindcss": "^3.4.17", diff --git a/src/components/Button.astro b/src/components/Button.astro index f020ca7..0f054c9 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -9,7 +9,7 @@ const { href, link } = Astro.props;
{link}
diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 899759a..69bc294 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -15,7 +15,7 @@ import borel from "@fontsource/borel/files/borel-latin-400-normal.woff2?url"; class="--translate-y-full animate-logo text-pretty text-4xl font-bold md:text-6xl" > Digital designer based in the United Kingdom. diff --git a/src/components/Prose.astro b/src/components/Prose.astro index 0495a6d..2f1ccdc 100644 --- a/src/components/Prose.astro +++ b/src/components/Prose.astro @@ -1,5 +1,5 @@
diff --git a/src/components/RelatedArticles.astro b/src/components/RelatedArticles.astro index 760d5c6..3147eed 100644 --- a/src/components/RelatedArticles.astro +++ b/src/components/RelatedArticles.astro @@ -1,6 +1,5 @@ --- -import { Icon } from "astro-icon/components"; - +import Button from "./Button.astro"; import { type CollectionEntry, getCollection } from "astro:content"; type Props = { @@ -21,39 +20,17 @@ const next = items[(index + 1) % items.length]; { items.length > 1 ? (
-
- +
-
- -

- {next.data.title} -

-
- +
) : null diff --git a/src/components/Skills.astro b/src/components/Skills.astro index df352e3..c076912 100644 --- a/src/components/Skills.astro +++ b/src/components/Skills.astro @@ -18,7 +18,6 @@ const skills = await Promise.all(
  • {entry.data.title}

    diff --git a/src/content/config.ts b/src/content/config.ts index d284d03..25ef88d 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -53,7 +53,7 @@ const work = defineCollection({ role: z.string(), dateStart: z.coerce.date(), dateEnd: z.union([z.coerce.date(), z.string()]), - article: z.string().url().optional(), + article: z.string().optional(), }), }); diff --git a/src/content/work/camouflage-store.md b/src/content/work/camouflage-store.md index 09cabe5..365b418 100644 --- a/src/content/work/camouflage-store.md +++ b/src/content/work/camouflage-store.md @@ -3,7 +3,7 @@ company: "Camouflage Store" role: "E-commerce Management & Video Production" dateStart: "2020" dateEnd: "Current" -article: "https://troylusty.com/projects/camouflage-store" +article: "/projects/camouflage-store" --- Migrating and managing an ecommerce store, in addition to creating informational video content. diff --git a/src/content/work/webboss.md b/src/content/work/webboss.md index 4761d88..1f70ef0 100644 --- a/src/content/work/webboss.md +++ b/src/content/work/webboss.md @@ -3,7 +3,7 @@ company: "WebBoss" role: "Web Design Mockups" dateStart: "2019" dateEnd: "2019" -article: "https://troylusty.com/projects/webboss" +article: "/projects/webboss" --- I joined WebBoss for a week as my work experience placement in Sixth Form. In my diff --git a/src/styles/global.css b/src/styles/global.css index 8e6dbdb..818739c 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -35,12 +35,6 @@ } } -@layer components { - .prose img { - @apply cursor-pointer transition-transform hover:scale-[98%] active:scale-[200%]; - } -} - @media print { body { background: none;