Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML: adding TOC structure to sidebar #328

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ brings together data, software, and computing so that researchers can focus on s
```{toctree}
---
maxdepth: 2
caption: Tutorial Notebooks
---

forced_photometry/README
Expand All @@ -21,6 +22,7 @@ light_curves/README
```{toctree}
---
maxdepth: 2
caption: User Documentation
---

documentation/README
Expand Down
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ deps =
allowlist_externals =
bash
git
sed

commands =
pip freeze

buildhtml: git clone --depth 1 https://github.com/nasa-fornax/fornax-documentation.git documentation
buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=off -nT --keep-going
# SED magic to remove the toctree captions from the rendered index page while keeping them in the sidebar TOC
buildhtml: sed -E -i.bak '/caption-text/{N; s/.+caption-text.+\n<ul>/<ul>/; P;D;}' _build/html/index.html
buildhtml: bash -c 'rm _build/html/index.html.bak'

skip_install = true