Repository navigation
Expand file tree
/
Copy pathastro.config.mjs
More file actions
113 lines (110 loc) · 3.75 KB
/
Copy pathastro.config.mjs
File metadata and controls
113 lines (110 loc) · 3.75 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
// @ts-check
import { defineConfig, passthroughImageService } from "astro/config";
import starlight from "@astrojs/starlight";
const googleAnalyticsId = "G-GQV41HQCLZ";
// https://astro.build/config
export default defineConfig({
site: "https://wc-toolkit.com",
integrations: [
starlight({
title: "Web Components Toolkit",
logo: {
src: "./public/favicon.svg",
alt: "WC Toolkit Logo",
},
social: {
github: "https://github.com/orgs/wc-toolkit/repositories",
},
head: [
// Adding google analytics
{
tag: "script",
attrs: {
src: `https://www.googletagmanager.com/gtag/js?id=${googleAnalyticsId}`,
},
},
{
tag: "script",
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${googleAnalyticsId}');
`,
},
],
sidebar: [
{
label: "Getting Started",
slug: "getting-started",
},
{
label: "Adoption",
items: [
{ label: "Overview", slug: "adoption/overview" },
{ label: "Changelog", slug: "adoption/changelog" },
{ label: "Lazy Loader", slug: "adoption/lazy-loader" },
],
},
{
label: "CEM Tools",
items: [
{ label: "Overview", slug: "cem-utilities/overview" },
{ label: "CEM Sorter", slug: "cem-utilities/cem-sorter" },
{ label: "CEM Validator", slug: "cem-utilities/cem-validator" },
{ label: "CEM Analyzer Plugin", slug: "cem-utilities/cem-analyzer-plugin" },
{
label: "Helpers",
collapsed: true,
items: [
{ label: "CEM Utilities", slug: "cem-utilities/cem-utils" },
{ label: "Deep Merge", slug: "cem-utilities/deep-merge" },
{ label: "Descriptions", slug: "cem-utilities/descriptions" },
{
label: "String Utilities",
slug: "cem-utilities/string-utils",
},
{ label: "Custom CEM Types", slug: "cem-utilities/types" },
],
},
],
},
{
label: "Documentation",
items: [
{ label: "Overview", slug: "documentation/overview" },
{ label: "CEM Inheritance", slug: "documentation/cem-inheritance" },
{ label: "JSDoc Tags", slug: "documentation/jsdoc-tags" },
{
label: "Module Path Resolver",
slug: "documentation/module-path-resolver",
},
{ label: "Type Parser", slug: "documentation/type-parser" },
],
},
{ label: "Editor Support", items: [
{ label: "VS Code", slug: "integrations/vscode" },
{ label: "JetBrains", slug: "integrations/jetbrains" },
{ label: "Neovim", slug: "integrations/neovim" },
{ label: "Zed", slug: "integrations/zed" },
]},
{
label: "Integrations",
items: [
{ label: "Overview", slug: "integrations/overview" },
{ label: "React", slug: "integrations/react" },
{ label: "JSX", slug: "integrations/jsx" },
{ label: "Vue.js", slug: "integrations/vuejs" },
{ label: "Svelte", slug: "integrations/svelte" },
{ label: "Linting & Validation", slug: "integrations/wctools" },
{ label: "Storybook", slug: "integrations/storybook" },
],
},
],
customCss: ["./src/styles/custom-styles.css"],
}),
],
image: {
service: passthroughImageService(),
},
});