Comments (13)
from sphinx-lesson.
Thanks! Yes, I'll try it out (later today) and report. I'll add documentation on how to do it.
from sphinx-lesson.
Not much luck. https://github.com/ENCCS/veloxchem-workshop/blob/master/content/conf.py jupyter-book
wants to read toc.yml
and I'm not sure how to convince it not to do that :/
from sphinx-lesson.
from sphinx-lesson.
sphinx-thebe would work, but I'd need to write the whole content in rst. I wanted to keep the ipynb files separate, such that they could be reused separately from the lesson. I need to dig a bit deeper.
from sphinx-lesson.
from sphinx-lesson.
Here it is: https://github.com/ENCCS/veloxchem-workshop I've managed to add a cell on the main page and it works. But the notebook in the "First VeloxChem calculation" is static.
from sphinx-lesson.
from sphinx-lesson.
Thanks for taking the time to look into this!
What I would like to achieve I would like to be able to use the Sphinx website as I would other lessons without interactive content, while being able to execute the cells without the need to share another browser tab. I feel this would be more engaging for the audience, since they can execute cells at the same time as I do and tinker around without losing (too much) focus on what I am sharing.
- Just using sphinx-thebe would be enough. But that requires that one works on the content of the executable cells separately and once that work is converged, copy-pastes them in markdown or restructuredtext.
- Adding the button "by hand" is no problem and, in fact, was the first thing I was going to do, before remembering about executable book. It would be great if the launch binder button could be added to sphinx-lesson through parameters in
conf.py
. - Third option is useful to not duplicate effort between developing the notebook and developing the lesson.
For my use case, I think I need 2+3: execute cells within the lesson, but provide an "escape hatch" to the mybinder.org instance behind it.
from sphinx-lesson.
And by the way, the course will take place in 3 months. I started setting it up early because there's a few moving parts I need to figure out (running quantum chemical calculations, visualizing molecules, and molecular orbitals)
from sphinx-lesson.
OK, it seems using sphinx-book-theme
does exactly what I want out of the box. I can write the content as notebooks and the theme will take care of rendering it and providing the launch buttons: https://enccs.github.io/veloxchem-workshop/ I've configured two buttons: to redirect to MyBinder or to start Thebe. What remains to be fixed is the styling of custom directives, which is somewhat related to #45.
from sphinx-lesson.
I think that matched what I saw: somehow, the theme would label everything on the whole-page level. I think that someone clever enough with javascript could probably get the same effect, but I'm not sure when I would get to it. Is that theme compatible enough to recommend in general for this use case?
from sphinx-lesson.
With sphinx_rtd_theme I was able to make a whole notebook executable:
-
start from a Jupyter notebook (thus it needs myst, not rst)
-
add config
`extensions.append('sphinx_thebe')
This config makes it detect output and link it properly, you could do other things depending on your interest:"selector": "div.cell", "selector_input": "div.cell_input", "selector_output": "div.cell_output", }
-
Add a launch button to a cell:
```{thebe-button} ```
-
Every cell in the notebook becomes executable
-
Other config likely needed, both in the page metadata and in the conf.py (setting kernels, repos to launch, etc): https://sphinx-thebe.readthedocs.io/en/latest/configure.html
... perhaps still need some debugging. (And in case of difficulties, I used the latest unreleased version of sphinx_thebe, but I think that shouldn't matter. However, somehow sphinx-autobuild
didn't work with it, I didn't have time to figure out why...)
from sphinx-lesson.
Related Issues (20)
- "git checkout s-l-t/master -- conf.py" is outdated HOT 8
- Add .jupyter_cache/ to .gitignore
- Should this repo be a template repo? HOT 3
- Can we color boxes differently? HOT 17
- Dropdown boxes shown by default HOT 2
- Are the symbols emojis? Or something else? HOT 6
- Copy button on code blocks broken in main page HOT 13
- How to make the side menu collapsible? HOT 5
- Automatic counters for challenges HOT 4
- Build problems on Python 3.9.2 HOT 8
- Unknown directive type "exercise". HOT 2
- Wrong link in PyP HOT 2
- cssname method now missing HOT 2
- exerciselist directive sometimes only shows the solution HOT 8
- The exercise list doesn't work with links in the exercises HOT 1
- error locally after upgrading sphinx_lesson HOT 4
- problem rendering math HOT 3
- Prompt (e.g. `$` is copied with sphinx-copybutton) HOT 1
- should `discussion` be included in the exercise list directive? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-lesson.