TeachBooks / external-content

Creative Commons Attribution 4.0 International
0 stars 1 forks source link

_toc.yml with git url #2

Open sverhoeven opened 1 month ago

sverhoeven commented 1 month ago

In _toc.yml we would like to point to a chapter living in a remote git repo.

chapters:
  - github: https://github.com/EXCITED-CO2/workshop_tutorial/blob/v1.0.0/book/ARCO-ERA5.ipynb

This would during build clone the repo in a subdir (EXCITED-CO2/workshop_tutorial/) and in generated rst doctrree use EXCITED-CO2/workshop_tutorial/blob/v1.0.0/book/ARCO-ERA5.ipynb as chapter

Jupyter book uses the sphinx_external_toc extension to read and process the _toc.yml , see https://github.com/jupyter-book/jupyter-book/blob/ae18e5276da6685984bfc720958bb539875d0469/jupyter_book/config.py#L37C13-L37C34

Maybe we create a fork of sphinx_external_toc extension and create a PR for it.

sverhoeven commented 1 month ago

See #1 for example git urls