-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
How to make JavaScript code examples runnable? #1453
Comments
I imagine you'd do some tinkering with book.js in the theme, specifically in the vicinity of: Line 127 in 4c951d5
|
@remexre Thanks for the advice. I'll see if I can find a backend, how much I need to alter the code, and I will follow up here with results when I get them. |
I'm trying to get this to work with C. So far I've modified the book.js but I can't get the play buttons to show up yet when language isn't set to rust. Will update if there's any progress. |
Ok juts got this working here.
That should be most of it. If you wanted to tweak my version of book.js. |
I appreciate you. I haven't gotten to this point yet (still doing other building stuff), but I will pretty soon. |
Did anyone figure out syntax highlighting? |
I've opened #2286. |
Thank you for this! Helps me immensely! |
Hi! Thanks for this great project.
Is there a way to run editable and runnable JS examples like the Rust ones? It seems those go to a remote location, which could be doable with a nodejs backend somewhere, but I'm not sure how to do that in
mdBook
.Is there a configuration option somewhere for what backend to send requests to? Is it something to do with Ace? Do I need a different editor entirely?
My use case: I'm writing a small book on ramda.js and want to have runnable examples of that but without having to pull in runkit or some other such thing.
I'm sure other people would want backends for Go, Python, Ruby, etc., too!
Thanks for your time. 💜
The text was updated successfully, but these errors were encountered: