Skip to content

Commit

Permalink
DOC: improve documentation sidebar (#209)
Browse files Browse the repository at this point in the history
* DOC: merge ComPWA project links

* DOC: remove API from main page (only sidebar)

* FIX: add back package title to sidebar
  • Loading branch information
redeboer committed Apr 6, 2023
1 parent 4851e16 commit 96b0eae
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 15 deletions.
41 changes: 40 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,45 @@ def fetch_logo(url: str, output_path: str) -> None:
html_static_path = ["_static"]
html_theme = "sphinx_book_theme"
html_theme_options = {
"icon_links": [
{
"name": "Common Partial Wave Analysis",
"url": "https://compwa-org.rtfd.io",
"icon": "_static/favicon.ico",
"type": "local",
},
{
"name": "GitHub",
"url": f"https://github.com/ComPWA/{REPO_NAME}",
"icon": "fa-brands fa-github",
},
{
"name": "PyPI",
"url": f"https://pypi.org/project/{PACKAGE}",
"icon": "fa-brands fa-python",
},
{
"name": "Conda",
"url": f"https://anaconda.org/conda-forge/{PACKAGE}",
"icon": "https://avatars.githubusercontent.com/u/22454001?s=100",
"type": "url",
},
{
"name": "Launch on Binder",
"url": (
f"https://mybinder.org/v2/gh/ComPWA/{REPO_NAME}/{BRANCH}?filepath=docs"
),
"icon": "https://mybinder.readthedocs.io/en/latest/_static/favicon.png",
"type": "url",
},
{
"name": "Launch on Colaboratory",
"url": f"https://colab.research.google.com/github/ComPWA/{REPO_NAME}/blob/{BRANCH}",
"icon": "https://avatars.githubusercontent.com/u/33467679?s=100",
"type": "url",
},
],
"logo": {"text": "Quantum number conservation rules"},
"repository_url": f"https://github.com/ComPWA/{REPO_NAME}",
"repository_branch": BRANCH,
"path_to_docs": "docs",
Expand All @@ -224,7 +263,7 @@ def fetch_logo(url: str, output_path: str) -> None:
"show_navbar_depth": 2,
"show_toc_level": 2,
}
html_title = "Quantum number conservation rules"
html_title = html_theme_options["logo"]["text"] # type: ignore[index]
pygments_style = "sphinx"
todo_include_todos = False
viewcode_follow_imported_members = True
Expand Down
22 changes: 8 additions & 14 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,19 @@ maxdepth: 2
install
usage
references
```

```{toctree}
---
hidden:
maxdepth: 2
---
API <api/qrules>
Changelog <https://github.com/ComPWA/qrules/releases>
Upcoming features <https://github.com/ComPWA/qrules/milestones?direction=asc&sort=title&state=open>
Help developing <https://compwa-org.readthedocs.io/en/stable/develop.html>
```

- {ref}`Python API <modindex>`
- {ref}`General Index <genindex>`
- {ref}`Search <search>`

```{toctree}
---
caption: Related projects
Expand All @@ -137,14 +140,5 @@ hidden:
AmpForm <https://ampform.readthedocs.io>
TensorWaves <https://tensorwaves.readthedocs.io>
PWA Pages <https://pwa.readthedocs.io>
```

```{toctree}
---
caption: ComPWA Organization
hidden:
---
Website <https://compwa-org.readthedocs.io>
GitHub Repositories <https://github.com/ComPWA>
About <https://compwa-org.readthedocs.io/en/stable/about.html>
ComPWA project <https://compwa-org.readthedocs.io>
```

0 comments on commit 96b0eae

Please sign in to comment.