Repository navigation
Expand file tree
/
Copy pathastro.config.mjs
More file actions
36 lines (33 loc) · 1.74 KB
/
Copy pathastro.config.mjs
File metadata and controls
36 lines (33 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// The site is a static portal deployed under /theme/ on GitHub Pages. Every
// value on the page comes from tokens/ and spec/; Astro owns no truth. See
// spec/decisions.md D-010 and D-012, and tests/dist/ for the base-path gate.
import { defineConfig, passthroughImageService } from "astro/config";
import { unified } from "@astrojs/markdown-remark";
import copyExports from "./site/integrations/copy-exports.mjs";
import rehypeSpec from "./site/integrations/rehype-spec.mjs";
import verification from "./site/integrations/verification.mjs";
import hexSwatches from "./site/integrations/hex-swatches.mjs";
import releaseComparisons from "./site/integrations/release-comparisons.mjs";
import { shikiTheme } from "./site/integrations/shiki-theme.mjs";
import manifest from "./theme.json" with { type: "json" };
const siteUrl = new URL(manifest.site.url);
export default defineConfig({
site: siteUrl.origin,
base: manifest.site.base,
trailingSlash: "always",
output: "static",
srcDir: "./site/src",
publicDir: "./site/public",
outDir: "./dist",
cacheDir: "./.cache/astro",
build: { format: "directory", assets: "_astro", inlineStylesheets: "auto" },
image: { service: passthroughImageService() },
vite: { build: { assetsInlineLimit: 0 } },
devToolbar: { enabled: false },
// The unified processor (pinned @astrojs/markdown-remark) so the heading-
// shift and token-reference plugin can run on the spec Markdown.
// Code blocks render in the theme the site documents; the default bundled
// theme shipped a foreign palette as inline style attributes.
markdown: { processor: unified({ rehypePlugins: [rehypeSpec] }), shikiConfig: { theme: shikiTheme() } },
integrations: [copyExports(), releaseComparisons(), hexSwatches(), verification()],
});