From 55c6ea31fde491a6759335a187d5e919de672daf Mon Sep 17 00:00:00 2001 From: codingfrog27 Date: Thu, 30 Apr 2026 12:33:54 +0200 Subject: [PATCH 1/5] optimised the tailwind pattern for build speed --- packages/astro-theme/tailwind.ts | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/packages/astro-theme/tailwind.ts b/packages/astro-theme/tailwind.ts index 3dce204c9..522648830 100644 --- a/packages/astro-theme/tailwind.ts +++ b/packages/astro-theme/tailwind.ts @@ -118,12 +118,27 @@ const disabledCss = { "blockquote p:last-of-type::after": false, }; +const CONTENT_EXT = "{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"; + export default function makeConfig(): Config { return { - content: [ - "./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}", - "../../packages/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}", - ], + content: { + relative: true, + files: [ + // Current subrepo content + `./src/**/*.${CONTENT_EXT}`, + // Monorepo shared package source only + `../../packages/**/*.${CONTENT_EXT}`, + // Hard excludes + `!../../packages/**/node_modules/**`, + `!../../packages/**/dist/**`, + `!../../packages/**/build/**`, + `!../../packages/**/.turbo/**`, + `!../../packages/**/.next/**`, + `!../../packages/**/.astro/**`, + `!../../packages/**/coverage/**`, + ], + }, theme: { extend: { fontFamily: { From a8b91c7a493cf148832ff8a4811ce14cdf45a4c4 Mon Sep 17 00:00:00 2001 From: codingfrog27 Date: Thu, 30 Apr 2026 12:34:48 +0200 Subject: [PATCH 2/5] wrapped index.astro in a valid html tage for pagefind and SEO improvement --- packages/astro-theme/pages/docs/index.astro | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/astro-theme/pages/docs/index.astro b/packages/astro-theme/pages/docs/index.astro index 49ff3dcfd..de7b4b6ec 100644 --- a/packages/astro-theme/pages/docs/index.astro +++ b/packages/astro-theme/pages/docs/index.astro @@ -5,4 +5,14 @@ const entry = (await getRootNav())[0]; if (!entry) throw new Error("must have a docs entry"); --- - + + + + + + Redirecting... + + +

Redirecting to {entry.href}...

+ + From 8c824ac0ad6f856e5f204e9c993b2cb708dd8799 Mon Sep 17 00:00:00 2001 From: codingfrog27 Date: Thu, 30 Apr 2026 12:36:33 +0200 Subject: [PATCH 3/5] replaced the npx pagefind with a spawned local binary to fix npmunknown env warning and protect against future version mismatching --- packages/astro-theme/pagefind.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/astro-theme/pagefind.ts b/packages/astro-theme/pagefind.ts index 8e4041cb0..1a512788c 100644 --- a/packages/astro-theme/pagefind.ts +++ b/packages/astro-theme/pagefind.ts @@ -2,7 +2,7 @@ // Combination of shishkin/astro-pagefind (outdated) and withastro/starlight. import { spawn } from "node:child_process"; -import { dirname, relative } from "node:path"; +import { dirname, join, relative } from "node:path"; import { fileURLToPath } from "node:url"; import sirv from "sirv"; import { type AstroIntegration } from "astro"; @@ -33,7 +33,12 @@ export default function pagefind(): AstroIntegration { }, "astro:build:done": () => { return new Promise((resolve) => { - spawn("npx", ["-y", "pagefind", "--site", outDir], { + const pagefindBin = + process.platform === "win32" + ? join(cwd, "node_modules", ".bin", "pagefind.cmd") + : join(cwd, "node_modules", ".bin", "pagefind"); + + spawn(pagefindBin, ["--site", outDir], { stdio: "inherit", shell: true, cwd, From f3caca4d1f4b4de1334467fc5c13137f8012516b Mon Sep 17 00:00:00 2001 From: codingfrog27 Date: Thu, 30 Apr 2026 12:37:32 +0200 Subject: [PATCH 4/5] put the font in an inline block to fix vite "cant resolve warning" As well as renaming font file to prevent pnpm breaking on it --- packages/astro-theme/layouts/Shell.astro | 16 +++++++--------- ...th,slnt].woff2 => MonaspaceArgonVarVF.woff2} | Bin 2 files changed, 7 insertions(+), 9 deletions(-) rename packages/astro-theme/public/fonts/monaspace/{MonaspaceArgonVarVF[wght,wdth,slnt].woff2 => MonaspaceArgonVarVF.woff2} (100%) diff --git a/packages/astro-theme/layouts/Shell.astro b/packages/astro-theme/layouts/Shell.astro index a0c7c63f7..88e14a321 100644 --- a/packages/astro-theme/layouts/Shell.astro +++ b/packages/astro-theme/layouts/Shell.astro @@ -20,6 +20,13 @@ const { title, description, image, site } = Astro.props; description={description || SITE_DESCRIPTION} {image} /> +