Skip to content

Commit 81edc7a

Browse files
committed
Update browser example
1 parent 3e61df6 commit 81edc7a

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

examples/browser/index.html

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>Code Hike in the browser</title>
55
<link
66
rel="stylesheet"
7-
href="https://esm.sh/@code-hike/mdx@0.4.0-next.1/dist/index.css"
7+
href="https://esm.sh/@code-hike/mdx@0.5.2-next.2/dist/index.css"
88
/>
99
</head>
1010
<body>
@@ -13,18 +13,26 @@
1313
<script type="module">
1414
import React from "https://esm.sh/react"
1515
import ReactDOM from "https://esm.sh/react-dom"
16-
import { evaluate } from "https://esm.sh/@mdx-js/mdx?dev"
16+
import { evaluate } from "https://esm.sh/@mdx-js/mdx?bundle"
1717
import * as runtime from "https://esm.sh/react/jsx-runtime.js"
1818

19-
import { remarkCodeHike } from "https://esm.sh/@code-hike/mdx@0.4.0-next.1/dist/index.browser.mjs"
20-
import { CH } from "https://esm.sh/@code-hike/mdx@0.4.0-next.1/components"
21-
import theme from "https://esm.sh/[email protected]/themes/nord.json" assert { type: "json" }
19+
import { remarkCodeHike } from "https://esm.sh/@code-hike/mdx@0.5.2-next.2/dist/index.browser.mjs?bundle"
20+
import { CH } from "https://esm.sh/@code-hike/mdx@0.5.2-next.2/components"
21+
import theme from "https://esm.sh/[email protected]/themes/dracula.json" assert { type: "json" }
2222

2323
const mdx = `# Test
2424
25-
~~~python hello.py mark=1[22:30]
26-
print("Rendered with Code Hike")
27-
~~~
25+
<CH.Code>
26+
27+
~~~python hello.py mark=1[22:30]
28+
print("Rendered with Code Hike")
29+
~~~
30+
31+
~~~js hello.js mark=1[23:36]
32+
console.log("Rendered with Code Hike")
33+
~~~
34+
35+
</CH.Code>
2836
`
2937

3038
const { default: Content } = await evaluate(mdx, {

0 commit comments

Comments
 (0)