Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow import of external files with from-annotation #410

Open
RichardJECooke opened this issue Oct 23, 2023 · 1 comment
Open

Allow import of external files with from-annotation #410

RichardJECooke opened this issue Oct 23, 2023 · 1 comment

Comments

@RichardJECooke
Copy link

I read https://codehike.org/docs/annotations#from-annotation and then tried:

'''js React.js
# from https://raw.githubusercontent.com/facebook/react/main/scripts/flow/runFlow.js
'''

but it does nothing. Being able to link to external code files, rather than copying and pasting code into all our documentation is important. Especially since code changes frequently.

Is there any workaround, like writing a short component in Nextra to import the code then pass it to Code Hike, possible please?

@pomber
Copy link
Contributor

pomber commented Nov 22, 2023

Hi, check the comment syntax, the example is for python, for js you should use:

```js
// from https://raw.githubusercontent.com/facebook/react/main/scripts/flow/runFlow.js
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants