How to make the notebooks work on a MySt site? #1084
-
Hi all, I'm using MySt to generate a static site. One of the pages is a Jupyter notebook. I would love it if people could just run a cell with some code and see the output, visually, on that very page. On my local machine, I got this working by following the instructions on this page in the MyST documentation. Basically, you run the notebook inJupyterLab and this somehow "talks" to the notebook in MyST. That is, you can click on the on/off button and it turns into a little menu where you can run the cells on the page. Also, the code cells themselves got little buttons. Fiddly to set up but nice when it finally worked. (Although the preview using But how does this work online? I tried connecting to Binder but I don't really understand what to do and cannot get it to work. I could do with some advice and clear explanation and instructions ("explain it to me like I'm 5 years old....") I do feel this - live notebooks - is the defining feature of MySt so it is important to get this right. Thanks for your help! Ernest some links: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@ErnestSuyver I see that the html pages are built in the actions, but they are not pushed to GitHub pages ernestsuyver.github.io/CCL/ is not accessible. I think the following configuration is needed: project:
thebe:
binder:
url: https://mybinder.org
repo: ErnestSuyver/CCL
ref: main instead of binder: https://mybinder.org/v2/gh/ErnestSuyver/CCL/HEAD in the To publish on GitHub pages, you can replace - name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html You need to set |
Beta Was this translation helpful? Give feedback.
@ErnestSuyver I see that the html pages are built in the actions, but they are not pushed to GitHub pages ernestsuyver.github.io/CCL/ is not accessible.
I think the following configuration is needed:
instead of
in the
myst.yml
config file.To publish on GitHub pages, you can replace
actions/deploy-pages@v2
step with the following.You need to set
GITHUB_TOKEN
…