Skip to content
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 .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,5 @@ jobs:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
with:
ignore_glob: docs/*.md
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

build:
os: ubuntu-24.04
tools:
python: mambaforge-23.11
jobs:
pre_build:
- pip install -v .

conda:
environment: docs/environment-docs.yml

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,25 @@ or:
jupyter lite serve --LiteBuildConfig.extra_http_headers=Cross-Origin-Embedder-Policy=require-corp --LiteBuildConfig.extra_http_headers=Cross-Origin-Opener-Policy=same-origin
```

### Building the documentation

The project documentation includes a demo deployment, and is built on every PR so that the changes can be checked manually before merging. To build the documentation and demo locally use:

```bash
micromamba create -f docs/environment-docs.yml
micromamba activate terminal-docs
pip install -v .
cd docs
make html
```

To serve this locally use:

```bash
cd _build/html
python -m http.server
```

### Packaging the extension

See [RELEASE](RELEASE.md)
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
67 changes: 67 additions & 0 deletions docs/_static/terminal_logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions docs/_static/terminal_logo_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/changelog.md
37 changes: 37 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from datetime import date
import json
from pathlib import Path

PACKAGE_JSON_FILENAME = Path(__file__).parent.parent / "package.json"
PACKAGE_JSON = json.loads(PACKAGE_JSON_FILENAME.read_text(encoding="utf-8"))

project = 'JupyterLite Terminal'
author = PACKAGE_JSON["author"]["name"]
copyright = f"2024-{date.today().year}, {author}"
release = PACKAGE_JSON["version"]

extensions = [
"jupyterlite_sphinx",
"myst_parser"
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

html_static_path = ['_static']
html_theme = "pydata_sphinx_theme"
html_theme_options = {
"github_url": PACKAGE_JSON["homepage"],
"logo": {
"alt_text": "JupyterLite Terminal - Home",
"image_dark": "_static/terminal_logo_dark.svg",
"image_light": "_static/terminal_logo_light.svg",
"text": "JupyterLite Terminal",
}
}
html_title = "JupyterLite Terminal"

# jupyterlite_sphonx settings
jupyterlite_contents = "../deploy/contents/"
jupyterlite_dir = "../deploy/"
jupyterlite_silence = False
17 changes: 17 additions & 0 deletions docs/environment-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: terminal-docs
channels:
- conda-forge
dependencies:
# General build dependencies
- micromamba
- nodejs =20
- python =3.13

# Jupyter dependencies
- jupyterlite-core >=0.6,<0.8.0

# Docs dependencies
- jupyterlite-sphinx
- myst-parser
- pydata-sphinx-theme
- sphinx
13 changes: 13 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# JupyterLite Terminal

Blah blah blah.

## Contents

```{toctree}
:maxdepth: 1

changelog
```

Link to <a href="./lite">deployment</a>.
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Loading