Repository navigation
Expand file tree
/
Copy pathastro.config.ts
More file actions
121 lines (113 loc) · 3.57 KB
/
Copy pathastro.config.ts
File metadata and controls
121 lines (113 loc) · 3.57 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 vercel from '@astrojs/vercel/static'
import path from 'path'
import mdx from '@astrojs/mdx'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import icon from 'astro-icon'
import expressiveCode from 'astro-expressive-code'
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeKatex from 'rehype-katex'
import remarkEmoji from 'remark-emoji'
import remarkMath from 'remark-math'
import rehypeDocument from 'rehype-document'
import pagefind from "astro-pagefind";
import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections'
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'
import tailwindcss from '@tailwindcss/vite'
// Import your site config for virtual:config
export default defineConfig({
site: 'https://www.dijkstra.org.in/',
output: 'static',
adapter: vercel({}),
integrations: [
pagefind(),
expressiveCode({
themes: ['github-light', 'github-dark'],
plugins: [pluginCollapsibleSections(), pluginLineNumbers()],
useDarkModeMediaQuery: false,
themeCssSelector: (theme) => `[data-theme="${theme.name.split('-')[1]}"]`,
defaultProps: {
wrap: true,
collapseStyle: 'collapsible-auto',
overridesByLang: {
'ansi,bat,bash,batch,cmd,console,powershell,ps,ps1,psd1,psm1,sh,shell, shellscript,shellsession,text,zsh':
{
showLineNumbers: false,
},
},
},
styleOverrides: {
codeFontSize: '0.75rem',
borderColor: 'var(--border)',
codeFontFamily: 'var(--font-mono)',
codeBackground:
'color-mix(in oklab, var(--secondary) 25%, transparent)',
frames: {
editorActiveTabForeground: 'var(--muted-foreground)',
editorActiveTabBackground:
'color-mix(in oklab, var(--secondary) 25%, transparent)',
editorActiveTabIndicatorBottomColor: 'transparent',
editorActiveTabIndicatorTopColor: 'transparent',
editorTabBorderRadius: '0',
editorTabBarBackground: 'transparent',
editorTabBarBorderBottomColor: 'transparent',
frameBoxShadowCssValue: 'none',
terminalBackground:
'color-mix(in oklab, var(--secondary) 25%, transparent)',
terminalTitlebarBackground: 'transparent',
terminalTitlebarBorderBottomColor: 'transparent',
terminalTitlebarForeground: 'var(--muted-foreground)',
},
lineNumbers: {
foreground: 'var(--muted-foreground)',
},
uiFontFamily: 'var(--font-sans)',
},
}),
mdx(),
react(),
sitemap(),
icon(),
],
vite: {
plugins: [tailwindcss()],
resolve: {
alias: {
'@': path.resolve('./src'),
'@assets': path.resolve('./src/assets'),
// Add this alias to solve the virtual:config error
'virtual:config': path.resolve('./src/site-config.ts'),
},
},
},
server: {
port: 1234,
host: true,
},
devToolbar: {
enabled: false,
},
markdown: {
syntaxHighlight: false,
rehypePlugins: [
[
rehypeDocument,
{
css: 'https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css',
},
],
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow', 'noreferrer', 'noopener'],
},
],
rehypeHeadingIds,
rehypeKatex,
],
remarkPlugins: [remarkMath, remarkEmoji],
},
})