Skip to content

Commit

Permalink
Feature/add nbsphinx (#21)
Browse files Browse the repository at this point in the history
* install nbsphinx

* fix license

* use nbsphinx in building the docs

* add test tutorial docs

* only test on PRs
  • Loading branch information
piskunow committed Nov 22, 2023
1 parent 8231e3f commit 7318078
Show file tree
Hide file tree
Showing 7 changed files with 390 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "[email protected]",
"friendly_name": "KPM Tools",
"github_user": "piskunow",
"license": "MIT",
"license": "BSD 2-Clause",
"package_name": "kpm_tools",
"project_name": "kpm-tools",
"version": "0.0.0"
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"sphinx.ext.napoleon",
"sphinx_click",
"myst_parser",
"nbsphinx",
]
autodoc_typehints = "description"
html_theme = "furo"
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ hidden:
maxdepth: 1
---
Tutorials <tutorials>
usage
reference
contributing
Expand Down
9 changes: 9 additions & 0 deletions docs/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 📘 Tutorials

```{toctree}
---
maxdepth: 1
---
tutorial_01_test
```
10 changes: 9 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,15 @@ def docs(session: Session) -> None:
"""Build and serve the documentation with live reloading on file changes."""
args = session.posargs or ["--open-browser", "docs", "docs/_build"]
session.install(".")
session.install("sphinx", "sphinx-autobuild", "sphinx-click", "furo", "myst-parser")
session.install(
"sphinx",
"sphinx-autobuild",
"sphinx-click",
"furo",
"myst-parser",
"nbsphinx",
"pandoc",
)

build_dir = Path("docs", "_build")
if build_dir.exists():
Expand Down
Loading

0 comments on commit 7318078

Please sign in to comment.