Repository navigation
Expand file tree
/
Copy pathastro.config.ts
More file actions
59 lines (57 loc) · 2.17 KB
/
Copy pathastro.config.ts
File metadata and controls
59 lines (57 loc) · 2.17 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { defineConfig } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import nimbus, {
defineConfig as defineNimbusConfig,
} from "@cloudflare/nimbus-docs";
import { tableScroll } from "@cloudflare/nimbus-docs/markdown";
const nimbusConfig = defineNimbusConfig({
site: "https://kmworks.date",
title: "kmworks",
description:
"kmworks is an open-source reading ecosystem: KMReader, a native Apple client, and KMServer, a full-featured Komga drop-in replacement in Rust with additional capabilities and a small memory footprint.",
locale: "en",
github: "https://github.com/kmworks",
editPattern: "https://github.com/kmworks/website/edit/main/{path}",
socialImageAlt: "kmworks — Komga-compatible reading, end to end",
sidebar: {
items: [
{ label: "KMServer", autogenerate: { directory: "server" } },
{ label: "KMReader", autogenerate: { directory: "reader" } },
],
},
});
export default defineConfig({
// nimbus:adapter
output: "static",
// Tailwind v4 via its Vite plugin (the integration Astro recommends for
// Tailwind v4 — replaces the PostCSS plugin, which doesn't build under
// Astro 7's Vite 8 bundler).
vite: {
plugins: [tailwindcss()],
},
// Hover-prefetch link targets so full-page navigations feel instant without
// a client-side router.
prefetch: {
prefetchAll: true,
defaultStrategy: "hover",
},
integrations: [
nimbus(nimbusConfig, {
// Authoring rules are opt-in by design — your repo, your taste. The
// two below are the load-bearing pair: frontmatter has to validate
// against the content schema for the page to render properly, and
// broken internal links are 404s for your readers. Add the others
// (heading hierarchy, code-block language, style, etc.) when you're
// ready to enforce them — see `nimbus-docs lint --help`.
rules: {
"nimbus/frontmatter-shape": "error",
"nimbus/internal-link": "error",
},
// Wrap wide tables so they scroll instead of overflowing the page
// (styled by `.nb-table-scroll` in src/styles/prose.css).
markdown: {
hastPlugins: [tableScroll()],
},
}),
],
});