alan-turing-institute / bio-Turing-Way

Experimenting with JupyterBooks, Sphinx, and training materials for biomed/life sciences from the Turing Way.
https://the-turing-way-personas.netlify.app/welcome
Other
4 stars 5 forks source link

Create cards with mini TOCs on a special Welcome Page #10

Closed LydiaFrance closed 2 years ago

LydiaFrance commented 2 years ago

Editing the markdown file for the special welcome page directly so that it includes links and previews of the editions. Cards are produced using the following syntax:

:::{panels}
:container: +full-width text-center
:column: col-lg-6 px-2 py-2
:card:

**[Publication-quality content](file-types:markdown)** ✍
^^^
Write in either Jupyter Markdown, MyST Markdown for more [publishing features](content/myst), [reStructuredText](file-types:rst), [Jupyter Notebooks](file-types:notebooks), or [any Jupytext format](file-types:custom).
Includes support for rich syntax such as [citations and cross-references](content/citations), [math and equations](content/math), and [figures](content/figures).

---
**[Execute, cache, and insert computational content](content/execute)** πŸš€
^^^
Execute notebook cells, then [format and insert the latest outputs](content:code-outputs) into your book.
[Cache outputs to save time in re-building later](execute/cache).
Even [save notebook outputs and insert them into other pages](content:code-outputs:glue).

---
**[Add interactivity to content and outputs](interactive/launchbuttons)** ✨
^^^
Create interactive content blocks such as [](content:tabs), [](content:dropdowns). [Toggle cell visibility](interactive/hiding) and include [interactive cell outputs](interactive/interactive) with Jupyter notebooks. [Launch interactive sessions](interactive/launchbuttons) with Binder or Colab, [make your code executable with Thebe](launch:thebe), or [connect with commenting services like Hypothes.is](interactive:comments).

---
**[Build books and articles in many formats](start/build)** 🎁
^^^
Build [multi-page books](structure:book) or [single articles](structure:article), and generate many kinds of outputs from them, such as [HTML websites](start/build) or [PDF outputs](advanced/pdf). Jupyter Book uses [the Sphinx Documentation engine](https://sphinx-doc.org) which supports [a variety of output types](https://www.sphinx-doc.org/en/master/usage/builders/index.html).

:::

In the pipeline this would need to happen after the different tocs are produced for each edition, but prior to the main/master Turing Way book being produced.

LydiaFrance commented 2 years ago

Either use a yaml parser to look at the profiles.yaml or... Use the directory tree and toc.yaml files