-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathastro.config.mjs
More file actions
121 lines (117 loc) · 3.98 KB
/
astro.config.mjs
File metadata and controls
121 lines (117 loc) · 3.98 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import MetaBind from './metaBindLanguage.js';
import CustomMD from './customMD.js';
import starlightLinksValidator from 'starlight-links-validator';
import starlightSiteGraph from 'starlight-site-graph';
import { bundledLanguages } from 'shiki';
import starlightTypeDoc, { typeDocSidebarGroup } from 'starlight-typedoc';
// https://astro.build/config
export default defineConfig({
site: 'https://www.moritzjung.dev',
base: '/obsidian-meta-bind-plugin-docs',
integrations: [
starlight({
title: 'Meta Bind Docs',
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/mProjectsCode/obsidian-meta-bind-plugin' }],
components: {
TableOfContents: './src/components/TableOfContents.astro',
SocialIcons: './src/components/SocialIcons.astro',
},
sidebar: [
{
label: 'Guides',
items: [
// Each item here is one entry in the navigation menu.
{ label: 'Installation', link: '/guides/installation/' },
{ label: 'Examples', link: '/guides/examples/' },
{ label: 'Styling and CSS', link: '/guides/stylingandcss/' },
{ label: 'Obsidian Publish', link: '/guides/obsidianpublish/' },
{
label: 'Features and Concepts',
items: [
{ label: 'Input Fields', link: '/guides/inputfields/' },
{ label: 'Input Field Templates', link: '/guides/templates/' },
{ label: 'View Fields', link: '/guides/viewfields/' },
{ label: 'Buttons', link: '/guides/buttons/' },
{ label: 'Meta Bind Embeds', link: '/guides/metabindembed/' },
{ label: 'Bind Targets', link: '/guides/bindtargets/' },
],
},
{
label: 'Advanced',
items: [
{ label: 'API', link: '/guides/api/' },
{ label: 'Advanced Use-Cases', link: '/guides/advancedusecases/' },
{ label: 'Customizing MathJS', link: '/guides/custommathjs/' },
],
},
],
},
{
label: 'Reference',
items: [
{ label: 'Input Fields', autogenerate: { directory: 'reference/inputFields' } },
{ label: 'Input Field Arguments', autogenerate: { directory: 'reference/inputFieldArguments' } },
{ label: 'View Fields', autogenerate: { directory: 'reference/viewFields' } },
{ label: 'View Field Arguments', autogenerate: { directory: 'reference/viewFieldArguments' } },
{ label: 'Button Actions', autogenerate: { directory: 'reference/buttonActions' } },
],
},
typeDocSidebarGroup,
],
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 3,
},
customCss: [
// Relative path to your custom CSS file
'./src/styles/custom.css',
],
expressiveCode: {
themes: ['dracula', 'github-light'],
useStarlightUiThemeColors: true,
shiki: {
langs: [...Object.entries(bundledLanguages).map(([_, langFn]) => langFn), MetaBind, CustomMD],
},
tabWidth: 4,
},
plugins: [
starlightLinksValidator({
errorOnRelativeLinks: false,
exclude: ['/obsidian-meta-bind-plugin-docs/api/**/*'],
}),
starlightTypeDoc({
entryPoints: ['obsidian-meta-bind-plugin/packages/obsidian/src/docsExports.ts'],
typeDoc: {
parametersFormat: 'htmlTable',
propertiesFormat: 'list',
enumMembersFormat: 'htmlTable',
typeDeclarationFormat: 'table',
excludePrivate: true,
excludeProtected: true,
excludeInternal: true,
plugin: ['typedoc-plugin-mdn-links'],
},
tsconfig: 'obsidian-meta-bind-plugin/packages/obsidian/tsconfig.json',
sidebar: {
label: 'API Reference',
collapsed: false,
},
}),
starlightSiteGraph({
graphConfig: {
depth: 5,
visibilityRules: ['!**/README.md', '!**/readme/**', '*/api/**'],
},
trackVisitedPages: 'disable',
storageLocation: 'none',
sitemapConfig: {
contentRoot: './src/content/docs',
pageInclusionRules: ['!**/README.md', '!**/readme/**', '**/api/**'],
},
}),
],
}),
],
});