-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
astro.config.ts
139 lines (133 loc) · 4.57 KB
/
astro.config.ts
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeExternalLinks from "rehype-external-links";
//import remarkHeadingID from 'remark-heading-id';
import starlightImageZoom from 'starlight-image-zoom';
import { visualizer } from "rollup-plugin-visualizer";
import vtbot from "astro-vtbot";
import d2 from "astro-d2";
import inoxToolsPortalGun from "@inox-tools/portal-gun";
import type { Badge } from 'node_modules/@astrojs/starlight/schemas/badge';
//import type { Badge } from 'node_modules/@astrojs/starlight/schemas/badge';
// https://astro.build/config
export default defineConfig({
experimental: { directRenderScript: true },
site: 'https://vtbag.dev',
compressHTML: false,
redirects: {
'/inspection-chamber/': '/tools/inspection-chamber/'
},
prefetch: false,
markdown: {
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, {
behavior: "wrap"
}], [rehypeExternalLinks, {
target: "_blank",
content: {
type: "text",
value: "↗"
}
}]]
// remarkPlugins: [remarkHeadingID]
},
trailingSlash: 'always',
integrations: [starlight({
title: '@vtbag',
components: {
Head: "./src/components/NHead.astro",
PageTitle: "./src/components/PageTitle.astro",
PageFrame: "./src/components/PageFrame.astro",
Sidebar: "./src/components/Sidebar.astro"
},
plugins: [starlightImageZoom()],
tableOfContents: {
minHeadingLevel: 2,
maxHeadingLevel: 4
},
head: [{
tag: "meta",
attrs: {
property: "og:image",
content: "https://vtbag.dev/social.png"
}
}],
customCss: ["./src/styles/custom.css"],
lastUpdated: true,
pagination: true,
favicon: "/bag4.png",
logo: {
src: "./src/assets/mini-bag.webp"
},
social: {
github: 'https://github.com/vtbag/website',
blueSky: 'https://bsky.app/profile/martr.app'
},
editLink: {
baseUrl: "https://github.com/vtbag/website/edit/main/"
},
sidebar: sidebar(),
}), d2({
skipGeneration: process.env.GITHUB_ACTIONS === "true"
}), vtbot({ autoLint: false, loadingIndicator: false }), inoxToolsPortalGun()],
vite: {
server: {
fs: {
allow: ['..']
}
},
plugins: [visualizer({
brotliSize: true
})]
}
});
function sidebar() {
return [{
label: '@vtbag',
link: '/vtbag/'
}, {
label: 'Tools',
items: [
{ label: 'Inspection Chamber', link: "/tools/inspection-chamber/" },
{ label: 'Element Crossing', link: "/tools/element-crossing/" },
{ label: 'Turn-Signal', link: "/tools/turn-signal/" },
{ label: 'Cam-Shaft', link: "/tools/cam-shaft/" }
],
}, {
label: 'Basics',
items: [
{ label: 'Browser Support', link: "/basics/test-page/" },
// { label: 'Step by Step Tutorial', link: "/basics/step-by-step/" },
{ label: 'View Transition API', link: "/basics/api/" },
{
label: 'View Transition Examples', link: "/basics/examples/", badge: { text: '🢀', variant: 'success' } as Badge,
},
{ label: 'Structure of Pseudo-Elements', link: "/basics/pseudos/" },
{ label: 'Mechanics of Default Animations', link: "/basics/default-animations/" },
{ label: 'Styling View Transitions', link: "/basics/styling/" },
{ label: "Playing Hide & Seek", link: "/basics/hide-and-seek/" }
]
}, {
label: 'CSS Tips & Tricks',
items: [
{ label: 'Where to place the CSS', link: "/tips/css/" },
{ label: "Flickering during morph animations?", link: "/tips/over-exposure/" },
{ label: "Avoid Pointer Flickering", link: "/tips/pointer/" },
{ label: "Pseudo-smooth-scrolling?", link: "/tips/pseudo-smooth-scrolling/" },
]
}, {
label: 'All Demos',
items: [
{ label: 'Inspection Chamber in Action', link: "/inspection-chamber-demo/first-page/" },
{ label: 'State Loss on Navigation', link: "/crossing/plain/1/" },
{ label: "Preserved State", link: "/crossing/vanilla/1/" },
{ label: "Preserved State (exp.)", link: "/crossing/over-the-top/1/" },
{ label: "Turn Signal Directions", link: "/signal-demo/bag/" },
{ label: "Pseudo-Smooth-Scrolling", link: "/shaft-demo/1/" },
{ label: "Instant scrolling with Cam-Shaft", link: "/shaft-demo2/1/" },
{ label: "Can't confine List Elements", link: "/tips/hide-and-seek/problem/" },
{ label: "Simulated Nested Transition Groups", link: "/tips/hide-and-seek/solution/" }
]
}];
}