Skip to content

Commit 6419616

Browse files
committed
test: test deploy new desmos package (bug)
1 parent e2389ba commit 6419616

File tree

6 files changed

+134
-13
lines changed

6 files changed

+134
-13
lines changed

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
77
# using the `master` branch as the default branch.
88
push:
9-
branches: [main, repo/ci-deploy]
9+
branches: [main, repo/ci-deploy, experiment/*]
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:

.vitepress/config.mts

+5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import { BiDirectionalLinks } from '@nolebase/markdown-it-bi-directional-links'
22
import {
33
InlineLinkPreviewElementTransform,
44
} from '@nolebase/vitepress-plugin-inline-link-preview/markdown-it'
5+
import MarkdownIt from 'markdown-it'
56
import Mark from 'markdown-it-mark'
67
import Callout from 'markdown-it-obsidian-callouts'
8+
import VitePluginDesmos from 'vite-plugin-desmos'
79
import { defineConfig } from 'vitepress'
810
import { withMermaid } from 'vitepress-plugin-mermaid'
911
import { sidebar } from '../constants/nav'
@@ -21,9 +23,11 @@ export default withMermaid(
2123
md.use(InlineLinkPreviewElementTransform)
2224
md.use(Mark)
2325
md.use(Callout)
26+
md.use(VitePluginDesmos)
2427
},
2528
},
2629
vite: {
30+
plugins: [VitePluginDesmos(new MarkdownIt())],
2731
optimizeDeps: {
2832
exclude: [
2933
'@nolebase/vitepress-plugin-inline-link-preview/client',
@@ -37,6 +41,7 @@ export default withMermaid(
3741
'@nolebase/vitepress-plugin-inline-link-preview',
3842
'mermaid',
3943
'vitepress-plugin-mermaid',
44+
'vite-plugin-desmos',
4045
],
4146
},
4247
},

constants/nav.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export const sidebar: DefaultTheme.Sidebar = [
1414
{
1515
text: 'Web Stuff, etc.',
1616
items: await getNavItems('/devnotes/typescript/'),
17-
}
18-
]
17+
},
18+
],
1919
},
2020
{
2121
text: 'Computer Science & Software Engineering',
@@ -55,7 +55,7 @@ export const sidebar: DefaultTheme.Sidebar = [
5555
collapsed: true,
5656
items: await getNavItems('/coding/cs61a/src/labs'),
5757
},
58-
]
58+
],
5959
},
6060
{
6161
text: 'CS106B: Programming Abstractions in C++',
@@ -88,7 +88,7 @@ export const sidebar: DefaultTheme.Sidebar = [
8888
collapsed: true,
8989
items: await getNavItems('/coding/cs61b/src/review/'),
9090
},
91-
]
91+
],
9292
},
9393
{
9494
text: 'CS61C: Machine Structure in C and RISC-V',
@@ -141,8 +141,8 @@ export const sidebar: DefaultTheme.Sidebar = [
141141
{ text: 'Parallelism', link: '/pages/coding/cs61c/src/performance/Parallelism' },
142142
{ text: 'Virtual Memory and OS', link: '/pages/coding/cs61c/src/performance/Virtual Memory and OS' },
143143
],
144-
}
145-
]
144+
},
145+
],
146146
},
147147
{
148148
text: 'C',
@@ -155,7 +155,7 @@ export const sidebar: DefaultTheme.Sidebar = [
155155
// link: '/pages/coding/nand2tetris/info',
156156
// items: await getNavItems('/coding/nand2tetris/src/')
157157
// },
158-
]
158+
],
159159
},
160160
{
161161
text: 'Math',
@@ -164,27 +164,27 @@ export const sidebar: DefaultTheme.Sidebar = [
164164
text: 'Calculus I',
165165
link: '/pages/math/calculus1/info',
166166
collapsed: true,
167-
items: await getNavItems('/math/calculus1/src/')
167+
items: await getNavItems('/math/calculus1/src/'),
168168
},
169169
{
170170
text: 'Calculus II',
171171
link: '/pages/math/calculus2/info',
172172
collapsed: true,
173-
items: await getNavItems('/math/calculus2/src/')
173+
items: await getNavItems('/math/calculus2/src/'),
174174
},
175175
{
176176
text: 'Probability and Statistics',
177177
link: '/pages/math/probability/info',
178178
collapsed: true,
179-
items: await getNavItems('/math/probability/src/')
179+
items: await getNavItems('/math/probability/src/'),
180180
},
181181
],
182182
},
183183
{
184184
text: 'Examples',
185185
items: [
186186
{ text: 'Markdown Examples', link: '/pages/markdown-examples' },
187-
{ text: 'Runtime API Examples', link: '/pages/api-examples' }
188-
]
187+
{ text: 'Runtime API Examples', link: '/pages/api-examples' },
188+
],
189189
},
190190
]

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
"dependencies": {
1313
"@nolebase/markdown-it-bi-directional-links": "^2.5.0",
1414
"@nolebase/vitepress-plugin-inline-link-preview": "^2.5.0",
15+
"markdown-it": "^14.1.0",
16+
"markdown-it-desmos": "github:mdrkrg/vite-plugin-desmos#41f66283f051cdd4ddac4c494364394d4d82bb40",
1517
"markdown-it-mark": "^4.0.0",
1618
"markdown-it-mathjax3": "^4.3.2",
1719
"markdown-it-obsidian-callouts": "github:mdrkrg/markdown-it-obsidian-callouts#f728d77ec55b9596bb9e4e3e48837a4d1d6e6230",
1820
"mermaid": "^11.2.1",
21+
"vite-plugin-desmos": "github:mdrkrg/vite-plugin-desmos#a4121344cf8a3c1ff3a163966d5f3e718325526d",
1922
"vitepress": "^1.3.4",
2023
"vitepress-plugin-mermaid": "^2.0.17",
2124
"vue": "^3.5.10"

pages/markdown-examples.md

+11
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ export default {
3232
}
3333
```
3434

35+
## Desmos Graphs
36+
37+
[My project](https://github.com/mdrkrg/vite-plugin-desmos)
38+
39+
```desmos-graph
40+
left=-0.1;right=0.1
41+
top=0.1;bottom=-0.1
42+
---
43+
f(x)=\abs(x)*{\sin(1/x)}
44+
```
45+
3546
## Custom Containers
3647

3748
**Input**

0 commit comments

Comments
 (0)