-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathastro.config.mjs
More file actions
89 lines (88 loc) · 2.32 KB
/
astro.config.mjs
File metadata and controls
89 lines (88 loc) · 2.32 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
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightTypeDoc, { typeDocSidebarGroup } from 'starlight-typedoc';
import starlightLinksValidator from 'starlight-links-validator';
import remarkMath from 'remark-math';
import rehypeMathjax from 'rehype-mathjax';
import starlightSiteGraph from 'starlight-site-graph';
// https://astro.build/config
export default defineConfig({
site: 'https://www.moritzjung.dev',
base: '/obsidian-js-engine-plugin-docs',
integrations: [
starlight({
title: 'JS Engine Docs',
social: {
github: 'https://github.com/mProjectsCode/obsidian-js-engine-plugin',
},
components: {
TableOfContents: './src/components/TableOfContents.astro',
SocialIcons: './src/components/SocialIcons.astro',
},
sidebar: [
{
label: 'Guides',
autogenerate: {
directory: 'guides',
},
},
{
label: 'Examples',
autogenerate: {
directory: 'examples',
},
},
typeDocSidebarGroup,
],
expressiveCode: {
themes: ['dracula', 'github-light'],
useStarlightUiThemeColors: true,
},
plugins: [
starlightLinksValidator({
errorOnRelativeLinks: false,
exclude: ['/obsidian-js-engine-plugin-docs/api/**/*'],
}),
starlightTypeDoc({
entryPoints: [
// 'obsidian-js-engine-plugin/JsEngine.d.ts',
'obsidian-js-engine-plugin/jsEngine/index.ts',
],
typeDoc: {
parametersFormat: 'htmlTable',
propertiesFormat: 'list',
enumMembersFormat: 'htmlTable',
typeDeclarationFormat: 'table',
excludePrivate: true,
excludeProtected: true,
excludeInternal: true,
plugin: ['typedoc-plugin-mdn-links'],
},
tsconfig: 'obsidian-js-engine-plugin/tsconfig.json',
sidebar: {
label: 'API Reference',
collapsed: true,
},
}),
starlightSiteGraph({
graphConfig: {
depth: 5,
visibilityRules: ['!**/api/README.md', '*/api/**'],
},
trackVisitedPages: 'disable',
storageLocation: 'none',
sitemapConfig: {
contentRoot: './src/content/docs',
pageInclusionRules: ['!**/api/README.md', '**/api/**'],
},
}),
],
customCss: ['./src/styles/custom.css'],
}),
// svelte(),
],
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeMathjax],
},
});