code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Does code hike support repl.it for spotlight preview beside of codesandbox? #301

Closed donghhan closed 1 year ago

donghhan commented 1 year ago

I am trying to figure out how to show preview feature through repl.it NOT through codesandbox, but it seems it keeps spitting errors.

<CH.Spotlight preset="https://replit.com/@donghhan/matrix#main.py" start={1}>
### 1
```py main.py
import numpy as np

A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])

print(A)
print(B)

2

import numpy as np

A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])

print(A * B)

</CH.Spotlight>

Error that I got:

Error compiling /Users/apensia/dev/apensia-nextra-devblog/pages/ai/basics-of-linear-algebra.ko.mdx
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/han/matrix#main.py/sandpack reason: Unexpected token S in JSON at position 0

error - ./pages/ai/basics-of-linear-algebra.ko.mdx
FetchError: invalid json response body at https://codesandbox.io/api/v1/sandboxes/han/matrix#main.py/sandpack reason: Unexpected token S in JSON at position 0
    at runMicrotasks (<anonymous>)
pomber commented 1 year ago

It only supports codesandbox for now

donghhan commented 1 year ago

Thank you for letting me know. Hoping it could support repl.it in some time.