Skip to content

Commit 5af4536

Browse files
authored
Merge pull request #423 from drizzle-team/refactor
Refactor
2 parents b2c89b3 + 499b5f0 commit 5af4536

File tree

557 files changed

+5978
-11457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

557 files changed

+5978
-11457
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ MDX files are located in this folder:
55
```text
66
├── src/
77
│ ├── content/
8-
│ │ └── documentation
8+
│ │ └── docs
99
```
1010

1111
Announcements markdown files:

astro.config.mjs

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@ import { defineConfig } from "astro/config";
22
import mdx from "@astrojs/mdx";
33
import rehypeSlug from "rehype-slug";
44
import rehypeAutolinkHeadings from "rehype-autolink-headings";
5-
import AutoImport from "astro-auto-import";
65
import react from "@astrojs/react";
7-
import {
8-
astroCodeSnippets,
9-
codeSnippetAutoImport,
10-
} from "./integration/astro-code-snippets";
116
import sitemap from "@astrojs/sitemap";
127
import yaml from '@rollup/plugin-yaml';
8+
import {
9+
codeSnippetTransformer,
10+
} from './src/transformers';
11+
import {
12+
transformerNotationDiff,
13+
transformerNotationHighlight,
14+
transformerNotationWordHighlight,
15+
transformerNotationFocus,
16+
transformerNotationErrorLevel,
17+
transformerMetaHighlight,
18+
transformerMetaWordHighlight,
19+
} from '@shikijs/transformers';
1320

1421
// https://astro.build/config
1522
export default defineConfig({
@@ -18,7 +25,14 @@ export default defineConfig({
1825
format: "file", // mandatory due to CloudFlare Pages trailing slash problem
1926
},
2027
vite: {
21-
plugins: [yaml()]
28+
plugins: [yaml()],
29+
css: {
30+
preprocessorOptions: {
31+
scss: {
32+
api: 'modern-compiler',
33+
},
34+
},
35+
}
2236
},
2337
image: {
2438
domains: ["img.youtube.com"],
@@ -28,10 +42,6 @@ export default defineConfig({
2842
defaultStrategy: "viewport",
2943
},
3044
integrations: [
31-
AutoImport({
32-
imports: [codeSnippetAutoImport],
33-
}),
34-
astroCodeSnippets(),
3545
mdx(),
3646
react({
3747
experimentalReactChildren: true,
@@ -56,6 +66,16 @@ export default defineConfig({
5666
],
5767
shikiConfig: {
5868
theme: "css-variables",
69+
transformers: [
70+
codeSnippetTransformer(),
71+
transformerNotationDiff(),
72+
transformerNotationHighlight(),
73+
transformerNotationWordHighlight(),
74+
transformerNotationFocus(),
75+
transformerNotationErrorLevel(),
76+
transformerMetaHighlight(),
77+
transformerMetaWordHighlight(),
78+
]
5979
},
6080
},
6181
shikiConfig: {

0 commit comments

Comments
 (0)