Skip to content

Commit 7256ae9

Browse files
authored
Add conda instructions and docs scripts (#97)
* Add scripts for building the docs * Add conda instructions * Simplify changelog generation
1 parent b0a6662 commit 7256ae9

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ jupyterlite_sphinx/jupyterlite_sphinx.egg-info
44
docs/build
55
build
66
dist
7+
.jupyterlite.doit.db

docs/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../CHANGELOG.md
2+
```

docs/conf.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
import shutil
3-
4-
from pathlib import Path
5-
6-
HERE = Path(__file__).parent
7-
ROOT = HERE.parent
8-
92

103
extensions = [
114
'jupyterlite_sphinx',
@@ -35,7 +28,4 @@
3528
]
3629
}
3730

38-
# Copy the markdown file here
39-
shutil.copy(ROOT / "CHANGELOG.md", HERE / "changelog.md")
40-
4131
suppress_warnings = ["myst.xref_missing"]

docs/installation.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ You can install `jupyterlite-sphinx` with `pip`:
66
pip install jupyterlite-sphinx
77
```
88

9+
`jupyterlite-sphinx` is also available on `conda-forge`. You can install it with `conda` or `mamba`:
10+
11+
```bash
12+
# with conda
13+
conda install -c conda-forge jupyterlite-sphinx
14+
15+
# with mamba
16+
mamba install -c conda-forge jupyterlite-sphinx
17+
```
18+
919
then you need to add the `jupyterlite-sphinx` extension to your `conf.py` file of your sphinx docs:
1020

1121
```python

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ dependencies = [
2121
]
2222

2323
[project.optional-dependencies]
24+
dev = [
25+
"hatch",
26+
]
27+
2428
docs = [
2529
"myst_parser",
2630
"pydata-sphinx-theme",
@@ -33,3 +37,9 @@ path = "jupyterlite_sphinx/__init__.py"
3337
include = [
3438
"/jupyterlite_sphinx",
3539
]
40+
41+
[tool.hatch.envs.docs]
42+
features = ["docs"]
43+
[tool.hatch.envs.docs.scripts]
44+
build = "sphinx-build -W -b html docs docs/build/html"
45+
serve = "python -m http.server --directory docs/build/html"

0 commit comments

Comments
 (0)