|
| 1 | +// @ts-check |
| 2 | +import { defineConfig, fontProviders } from "astro/config"; |
| 3 | +import starlight from "@astrojs/starlight"; |
| 4 | + |
| 5 | +import mermaid from "astro-mermaid"; |
| 6 | +import catppuccin from "@catppuccin/starlight"; |
| 7 | + |
| 8 | +// https://astro.build/config |
| 9 | +export default defineConfig({ |
| 10 | + experimental: { |
| 11 | + fonts: [ |
| 12 | + { |
| 13 | + provider: fontProviders.google(), |
| 14 | + name: "Victor Mono", |
| 15 | + cssVariable: "--sl-font", |
| 16 | + }, |
| 17 | + ], |
| 18 | + }, |
| 19 | + integrations: [ |
| 20 | + mermaid({ |
| 21 | + theme: "forest", |
| 22 | + autoTheme: true, |
| 23 | + }), |
| 24 | + starlight({ |
| 25 | + title: "nix-version", |
| 26 | + sidebar: [ |
| 27 | + { |
| 28 | + label: "Getting Started", |
| 29 | + items: [ |
| 30 | + { label: "Installing", slug: "getting-started/installing" }, |
| 31 | + { label: "Listing package versions", slug: "getting-started/listing-versions" }, |
| 32 | + { label: "Finding packages", slug: "getting-started/finding-packages" }, |
| 33 | + { label: "CLI Help", slug: "getting-started/cli-help" }, |
| 34 | + ], |
| 35 | + }, |
| 36 | + { |
| 37 | + label: "Guides", |
| 38 | + items: [ |
| 39 | + { label: "Tools Version Manager", slug: "tools-version-manager" }, |
| 40 | + { label: "Flake Generator", slug: "flake-generator" }, |
| 41 | + { label: "Non-Flake Environments", slug: "non-flake-environments" }, |
| 42 | + { label: "Installing packages on profiles", slug: "installing-packages-on-profiles" }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + ], |
| 46 | + components: { |
| 47 | + Sidebar: "./src/components/Sidebar.astro", |
| 48 | + Footer: "./src/components/Footer.astro", |
| 49 | + SocialIcons: "./src/components/SocialIcons.astro", |
| 50 | + PageSidebar: "./src/components/PageSidebar.astro", |
| 51 | + }, |
| 52 | + plugins: [ |
| 53 | + catppuccin({ |
| 54 | + dark: { flavor: "macchiato", accent: "mauve" }, |
| 55 | + light: { flavor: "latte", accent: "mauve" }, |
| 56 | + }), |
| 57 | + ], |
| 58 | + editLink: { |
| 59 | + baseUrl: "https://github.com/vic/flake-file/edit/main/docs/", |
| 60 | + }, |
| 61 | + customCss: ["./src/styles/custom.css"], |
| 62 | + }), |
| 63 | + ], |
| 64 | +}); |
0 commit comments