Skip to content

Commit f4a6ba8

Browse files
committed
Add a rehype plugin to convert static to dynamic config
1 parent e401a20 commit f4a6ba8

22 files changed

+901
-2196
lines changed

docusaurus.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import remarkNpm2Yarn from '@docusaurus/remark-plugin-npm2yarn';
22
import rehypeCodeblockMeta from './src/plugins/rehype-codeblock-meta.mjs';
3+
import rehypeStaticToDynamic from './src/plugins/rehype-static-to-dynamic.mjs';
34

45
export default {
56
future: {
@@ -148,6 +149,7 @@ export default {
148149
rehypeCodeblockMeta,
149150
{ match: { snack: true, lang: true, tabs: true } },
150151
],
152+
rehypeStaticToDynamic,
151153
],
152154
},
153155
blog: {

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
"react-simple-code-editor": "^0.14.1"
3232
},
3333
"devDependencies": {
34+
"@babel/types": "^7.28.5",
3435
"markdownlint": "^0.36.1",
3536
"markdownlint-cli2": "^0.14.0",
36-
"prettier": "^3.3.3"
37+
"prettier": "^3.6.2",
38+
"recast": "^0.23.11"
3739
},
3840
"resolutions": {
3941
"@rspack/core": "1.0.14"

src/css/custom.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
--primary-saturation: 53.2%;
1111
--primary-lightness: 50.2%;
1212

13-
--ifm-font-family-monospace: ui-monospace, SFMono-Regular, Menlo, Monaco,
14-
Consolas, Liberation Mono, Courier New, monospace;
15-
--ifm-font-family-base: ui-sans-serif, system-ui, -apple-system,
16-
BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans,
17-
sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,
18-
Noto Color Emoji;
13+
--ifm-font-family-monospace:
14+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono,
15+
Courier New, monospace;
16+
--ifm-font-family-base:
17+
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,
18+
Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji,
19+
Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
1920

2021
--ifm-code-font-size: 85%;
2122

0 commit comments

Comments
 (0)