Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions packages/astro-theme/layouts/Shell.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ const { title, description, image, site } = Astro.props;
description={description || SITE_DESCRIPTION}
{image}
/>
<style is:inline is:global>
@font-face {
font-family: "Monaspace Argon";
src: url("/fonts/monaspace/MonaspaceArgonVarVF.woff2") format("woff2");
font-display: swap;
}
</style>
<style is:global>
.dark {
color-scheme: dark;
Expand All @@ -41,15 +48,6 @@ const { title, description, image, site } = Astro.props;
opacity: 1;
}

@font-face {
font-family: "Monaspace Argon";
src:
url("/fonts/monaspace/MonaspaceArgonVarVF[wght,wdth,slnt].otf")
format("woff2"),
url("/fonts/monaspace/MonaspaceArgonVarVF[wght,wdth,slnt].woff2")
format("woff2-variations");
}

code {
/* Leaning Technologies ;) */
font-variation-settings: "slnt" -9 !important;
Expand Down
9 changes: 7 additions & 2 deletions packages/astro-theme/pagefind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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,
Expand Down
12 changes: 11 additions & 1 deletion packages/astro-theme/pages/docs/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ const entry = (await getRootNav())[0];
if (!entry) throw new Error("must have a docs entry");
---

<meta http-equiv="refresh" content={`0; url=${entry.href}`} />
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="refresh" content={`0; url=${entry.href}`} />
<title>Redirecting...</title>
</head>
<body>
<p>Redirecting to <a href={entry.href}>{entry.href}</a>...</p>
</body>
</html>
23 changes: 19 additions & 4 deletions packages/astro-theme/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
3 changes: 3 additions & 0 deletions sites/browserpod/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export default defineConfig({
}),
],
vite: {
build: {
chunkSizeWarningLimit: 700,
},
resolve: {
alias: [
{
Expand Down
Loading