Skip to content

Commit

Permalink
Add conda instructions and docs scripts (#97)
Browse files Browse the repository at this point in the history
* Add scripts for building the docs

* Add conda instructions

* Simplify changelog generation
  • Loading branch information
jtpio authored Apr 22, 2023
1 parent b0a6662 commit 7256ae9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ jupyterlite_sphinx/jupyterlite_sphinx.egg-info
docs/build
build
dist
.jupyterlite.doit.db
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../CHANGELOG.md
```
10 changes: 0 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
# -*- coding: utf-8 -*-
import shutil

from pathlib import Path

HERE = Path(__file__).parent
ROOT = HERE.parent


extensions = [
'jupyterlite_sphinx',
Expand Down Expand Up @@ -35,7 +28,4 @@
]
}

# Copy the markdown file here
shutil.copy(ROOT / "CHANGELOG.md", HERE / "changelog.md")

suppress_warnings = ["myst.xref_missing"]
10 changes: 10 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ You can install `jupyterlite-sphinx` with `pip`:
pip install jupyterlite-sphinx
```

`jupyterlite-sphinx` is also available on `conda-forge`. You can install it with `conda` or `mamba`:

```bash
# with conda
conda install -c conda-forge jupyterlite-sphinx

# with mamba
mamba install -c conda-forge jupyterlite-sphinx
```

then you need to add the `jupyterlite-sphinx` extension to your `conf.py` file of your sphinx docs:

```python
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ dependencies = [
]

[project.optional-dependencies]
dev = [
"hatch",
]

docs = [
"myst_parser",
"pydata-sphinx-theme",
Expand All @@ -33,3 +37,9 @@ path = "jupyterlite_sphinx/__init__.py"
include = [
"/jupyterlite_sphinx",
]

[tool.hatch.envs.docs]
features = ["docs"]
[tool.hatch.envs.docs.scripts]
build = "sphinx-build -W -b html docs docs/build/html"
serve = "python -m http.server --directory docs/build/html"

0 comments on commit 7256ae9

Please sign in to comment.