executablebooks / sphinx-external-toc

A sphinx extension that allows the site-map to be defined in a single YAML file
https://sphinx-external-toc.readthedocs.io
MIT License
33 stars 18 forks source link

Consider a `jb-journal` TOC format #31

Open choldgraf opened 3 years ago

choldgraf commented 3 years ago

I was recently in a meeting where we were talking about building an end-to-end pipeline for publishing using Jupyter notebooks + md files etc as inputs.

It made me wonder if we could define another TOC format that is designed for a collection of papers. This would essentially be a way to generalize the jb-article format to include multiple papers, so maybe it'd be as simple as:

format: jb-journal
root: index
articles:
- title: some title
  sections:
  - The rest is the same as jb-article
- title: some other
  sections:
  - The rest is the same as jb-article

What would be even more interesting is if we could trigger different doctree logic depending on the TOC format. For example, maybe if it's an article, then sections have the option of being concatenated into a single page, rather than existing as unique URLs each (basically, the same behavior as singlehtml but at the level of a toctree rather than for the whole site.

(obviously this is a future issue and not blocking on an early release)

chrisjsewell commented 3 years ago

What would be even more interesting is if we could trigger different doctree logic depending on the TOC format.

well this will already actually the case with jupyterbook-latex; where it will auto-infer the toplevel sectioning based on the format (executablebooks/jupyterbook-latex#55)