-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathastro.config.mjs
More file actions
93 lines (90 loc) · 3.27 KB
/
astro.config.mjs
File metadata and controls
93 lines (90 loc) · 3.27 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import { autolinkConfig } from "./plugins/rehype-autolink-config";
import { defineConfig } from "astro/config";
import { externalLinkConfig } from "./plugins/rehype-external-link-config";
import { rehypeTasklistEnhancer } from "./plugins/rehype-tasklist-enhancer";
// https://astro-d2.vercel.app/getting-started/
import astroD2 from 'astro-d2';
import react from "@astrojs/react";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeExternalLinks from "rehype-external-links";
import rehypeSlug from "rehype-slug";
import starlight from "@astrojs/starlight";
// https://starlight-links-validator.vercel.app/getting-started/
import starlightLinksValidator from "starlight-links-validator";
// Config partials
import { siteNav } from "./src/config/nav";
import { head } from "./src/config/head";
import { locales } from "./src/config/locales";
const site = "https://docs.oxyprops.com/";
// https://astro.build/config
export default defineConfig({
site,
integrations: [
astroD2({
sketch: true,
pad: 50,
}),
starlight({
title: "o-props docs",
logo: {
src: "~/assets/logos/o-props-logotype.svg",
replacesTitle: true,
},
editLink: {
baseUrl: "https://github.com/thewebforge/o-props-docs/edit/main/",
},
social: {
youtube: "https://youtube.com/@oxyprops",
github: "https://github.com/OxyProps/docs",
discord: "https://docs.oxyprops.com/discord",
},
head: head,
customCss: process.env.NO_GRADIENTS
? []
: [
"/src/styles/o-props.css",
"@fontsource/atkinson-hyperlegible/400.css",
"@fontsource/atkinson-hyperlegible/700.css",
"@fontsource/atkinson-hyperlegible/400-italic.css",
"@fontsource/atkinson-hyperlegible/700-italic.css",
],
sidebar: siteNav,
defaultLocale: "en",
locales: locales,
lastUpdated: true,
components: {
// EditLink: './src/components/starlight/EditLink.astro',
// Head: './src/components/starlight/Head.astro',
// Hero: './src/components/starlight/Hero.astro',
// MarkdownContent: './src/components/starlight/MarkdownContent.astro',
MobileTableOfContents:
"./src/components/starlight/MobileTableOfContents.astro",
TableOfContents: "./src/components/starlight/TableOfContents.astro",
PageSidebar: "./src/components/starlight/PageSidebar.astro",
Pagination: "./src/components/starlight/Pagination.astro",
SiteTitle: "./src/components/starlight/SiteTitle.astro",
// Search: './src/components/starlight/Search.astro',
// Sidebar: './src/components/starlight/Sidebar.astro',
// PageTitle: './src/components/starlight/PageTitle.astro',
},
// plugins: [
// starlightLinksValidator({
// errorOnFallbackPages: false,
// errorOnInconsistentLocale: true,
// errorOnRelativeLinks: false,
// }),
// ],
}),
react(),
],
markdown: {
rehypePlugins: [
rehypeSlug,
// This adds links to headings
[rehypeAutolinkHeadings, autolinkConfig],
// This adds rel and icon to external links
[rehypeExternalLinks, externalLinkConfig],
rehypeTasklistEnhancer(),
],
},
});