Skip to content

Commit 4ee815e

Browse files
authored
Merge pull request #352 from consideRatio/pr/docs-refactor
docs: switch from alabaster to sphinx-book-theme, and misc docs build system maintenance
2 parents 0bae110 + e6ec041 commit 4ee815e

22 files changed

+122
-111
lines changed

.readthedocs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#
55
version: 2
66

7+
sphinx:
8+
configuration: docs/source/conf.py
9+
710
build:
811
os: ubuntu-22.04
912
tools:
@@ -12,6 +15,3 @@ build:
1215
python:
1316
install:
1417
- requirements: docs/requirements.txt
15-
16-
sphinx:
17-
configuration: docs/conf.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The primary use cases are:
2727
JupyterLab extensions) to access web APIs of other processes running
2828
locally in a safe manner. This is used by the [JupyterLab
2929
extension](https://github.com/dask/dask-labextension) for
30-
[dask](https://dask.org/).
30+
[dask](https://www.dask.org/).
3131

3232
[The documentation](https://jupyter-server-proxy.readthedocs.io/)
3333
contains information on installation & usage.

RELEASE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ For you to follow along according to these instructions, you need:
2929
python setup.py sdist bdist_wheel
3030
```
3131

32-
2. Update [CHANGELOG.md](CHANGELOG.md). Doing this can be made easier with the
33-
help of the
34-
[choldgraf/github-activity](https://github.com/choldgraf/github-activity)
32+
2. Update [changelog.md](docs/source/changelog.md). Doing this can be made
33+
easier with the help of the
34+
[executablebooks/github-activity](https://github.com/executablebooks/github-activity)
3535
utility.
3636

3737
## Steps to make a release

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# You can set these variables from the command line.
55
SPHINXOPTS ?=
66
SPHINXBUILD ?= sphinx-build
7-
SOURCEDIR = .
7+
SOURCEDIR = source
88
BUILDDIR = _build
99

1010
# Put it first so that "make" without argument is like "make help".

docs/conf.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

docs/convenience/packages/theia.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/make.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ REM Command file for Sphinx documentation
77
if "%SPHINXBUILD%" == "" (
88
set SPHINXBUILD=sphinx-build
99
)
10-
set SOURCEDIR=.
10+
set SOURCEDIR=source
1111
set BUILDDIR=_build
1212

1313
if "%1" == "" goto help

docs/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
myst-parser
2-
pydata-sphinx-theme
32
sphinx-autobuild
3+
sphinx-book-theme
44
sphinx-copybutton
5+
sphinxext-opengraph
6+
sphinxext-rediraffe

CHANGELOG.md renamed to docs/source/changelog.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1+
# Changelog
2+
13
## 3.2
24

35
### 3.2.1 - 2022-01-24
46

57
3.2.1 is a security release, fixing a vulnerability [GHSA-gcv9-6737-pjqw](https://github.com/jupyterhub/jupyter-server-proxy/security/advisories/GHSA-gcv9-6737-pjqw) where `allowed_hosts` were not validated correctly.
68

7-
## Maintenance and upkeep improvements
9+
#### Maintenance and upkeep improvements
810

11+
- Remove empty JupyterLab style [#314](https://github.com/jupyterhub/jupyter-server-proxy/pull/314) ([@bollwyvl](https://github.com/bollwyvl))
912
- Modernize docs without making changes to its content [#313](https://github.com/jupyterhub/jupyter-server-proxy/pull/313) ([@consideRatio](https://github.com/consideRatio))
1013
- Remove no longer needed logic involving six [#312](https://github.com/jupyterhub/jupyter-server-proxy/pull/312) ([@consideRatio](https://github.com/consideRatio))
1114
- Update language, from master to main [#311](https://github.com/jupyterhub/jupyter-server-proxy/pull/311) ([@consideRatio](https://github.com/consideRatio))
1215

13-
## Other merged PRs
16+
#### Continuous integration improvements
1417

15-
- Remove empty JupyterLab style [#314](https://github.com/jupyterhub/jupyter-server-proxy/pull/314) ([@bollwyvl](https://github.com/bollwyvl))
1618
- ci: avoid triggering ci twice on pre-commit.ci/dependabot prs [#310](https://github.com/jupyterhub/jupyter-server-proxy/pull/310) ([@consideRatio](https://github.com/consideRatio))
1719

18-
## Contributors to this release
20+
#### Contributors to this release
1921

2022
([GitHub contributors page for this release](https://github.com/jupyterhub/jupyter-server-proxy/graphs/contributors?from=2021-11-29&to=2022-01-19&type=c))
2123

22-
[@bollwyvl](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3Abollwyvl+updated%3A2021-11-29..2022-01-19&type=Issues) | [@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3AconsideRatio+updated%3A2021-11-29..2022-01-19&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3Awelcome+updated%3A2021-11-29..2022-01-19&type=Issues) | [@yuvipanda](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3Ayuvipanda+updated%3A2021-11-29..2022-01-19&type=Issues)
24+
[@bollwyvl](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3Abollwyvl+updated%3A2021-11-29..2022-01-19&type=Issues) | [@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3AconsideRatio+updated%3A2021-11-29..2022-01-19&type=Issues) | [@yuvipanda](https://github.com/search?q=repo%3Ajupyterhub%2Fjupyter-server-proxy+involves%3Ayuvipanda+updated%3A2021-11-29..2022-01-19&type=Issues)
2325

2426

2527
### 3.2.0 - 2021-11-29
@@ -51,7 +53,7 @@
5153

5254
- Fix link to contributing.md [#291](https://github.com/jupyterhub/jupyter-server-proxy/pull/291) ([@kinow](https://github.com/kinow))
5355

54-
#### Continuous integration
56+
#### Continuous integration improvements
5557

5658
- Test with lab [#298](https://github.com/jupyterhub/jupyter-server-proxy/pull/298) ([@maresb](https://github.com/maresb))
5759
- Open browser not required for running pytests [#273](https://github.com/jupyterhub/jupyter-server-proxy/pull/273) ([@candlerb](https://github.com/candlerb))
@@ -85,11 +87,11 @@
8587

8688
- Reduce (and test) sdist size [#263](https://github.com/jupyterhub/jupyter-server-proxy/pull/263) ([@bollwyvl](https://github.com/bollwyvl))
8789

88-
#### Continuous integration
90+
#### Continuous integration improvements
8991

9092
- Add acceptance testing with robotframework(-jupyterlibrary) [#269](https://github.com/jupyterhub/jupyter-server-proxy/pull/269) ([@bollwyvl](https://github.com/bollwyvl))
9193

92-
#### #### Dependency updates
94+
#### Dependency updates
9395

9496
- Bump postcss from 7.0.35 to 7.0.36 in /jupyterlab-server-proxy [#277](https://github.com/jupyterhub/jupyter-server-proxy/pull/277) ([@dependabot](https://github.com/dependabot))
9597
- Bump normalize-url from 4.5.0 to 4.5.1 in /jupyterlab-server-proxy [#276](https://github.com/jupyterhub/jupyter-server-proxy/pull/276) ([@dependabot](https://github.com/dependabot))
@@ -143,7 +145,7 @@ version jumps from 2.1.2 to 3.0.0.
143145
* Breaking: Replace host_whitelist with host_allowlist [#256](https://github.com/jupyterhub/jupyter-server-proxy/pull/256) ([@manics](https://github.com/manics))
144146
* Switch from notebook to jupyter-server [#254](https://github.com/jupyterhub/jupyter-server-proxy/pull/254) ([@manics](https://github.com/manics))
145147

146-
#### Continuous integration
148+
#### Continuous integration improvements
147149

148150
* Move build.yaml into test.yaml [#255](https://github.com/jupyterhub/jupyter-server-proxy/pull/255) ([@manics](https://github.com/manics))
149151
* Fix build.yaml workflow [#249](https://github.com/jupyterhub/jupyter-server-proxy/pull/249) ([@manics](https://github.com/manics))

docs/source/conf.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Configuration file for Sphinx to build our documentation to HTML.
2+
#
3+
# Configuration reference: https://www.sphinx-doc.org/en/master/usage/configuration.html
4+
#
5+
import datetime
6+
7+
8+
# -- Project information -----------------------------------------------------
9+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
10+
#
11+
project = "Jupyter Server Proxy"
12+
copyright = f"{datetime.date.today().year}, Project Jupyter Contributors"
13+
author = "Project Jupyter Contributors"
14+
15+
16+
# -- General Sphinx configuration ---------------------------------------------------
17+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
18+
#
19+
# Add any Sphinx extension module names here, as strings. They can be extensions
20+
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
21+
#
22+
extensions = [
23+
"myst_parser",
24+
"sphinx_copybutton",
25+
"sphinxext.opengraph",
26+
"sphinxext.rediraffe",
27+
]
28+
root_doc = "index"
29+
source_suffix = [".md", ".rst"]
30+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
31+
32+
33+
# -- Options for HTML output -------------------------------------------------
34+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
35+
#
36+
# html_logo = "_static/images/logo/logo.png"
37+
html_favicon = "_static/images/logo/favicon.ico"
38+
html_static_path = ["_static"]
39+
40+
# sphinx_book_theme reference: https://sphinx-book-theme.readthedocs.io/en/latest/?badge=latest
41+
html_theme = "sphinx_book_theme"
42+
html_theme_options = {
43+
"home_page_in_toc": True,
44+
"repository_url": "https://github.com/jupyterhub/jupyter-server-proxy/",
45+
"repository_branch": "main",
46+
"path_to_docs": "docs/source",
47+
"use_download_button": False,
48+
"use_edit_page_button": True,
49+
"use_issues_button": True,
50+
"use_repository_button": True,
51+
}
52+
53+
54+
# -- Options for linkcheck builder -------------------------------------------
55+
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder
56+
#
57+
linkcheck_ignore = [
58+
r"(.*)github\.com(.*)#", # javascript based anchors
59+
r"(.*)/#%21(.*)/(.*)", # /#!forum/jupyter - encoded anchor edge case
60+
r"https://github.com/[^/]*$", # too many github usernames / searches in changelog
61+
"https://github.com/jupyterhub/jupyter-server-proxy/pull/", # too many PRs in changelog
62+
"https://github.com/jupyterhub/jupyter-server-proxy/compare/", # too many comparisons in changelog
63+
]
64+
linkcheck_anchors_ignore = [
65+
"/#!",
66+
"/#%21",
67+
]
68+
69+
70+
# -- Options for the opengraph extension -------------------------------------
71+
# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options
72+
#
73+
# ogp_site_url is set automatically by RTD
74+
# ogp_image = "_static/images/logo/logo.png"
75+
ogp_use_first_image = True
76+
77+
78+
# -- Options for the rediraffe extension -------------------------------------
79+
# ref: https://github.com/wpilibsuite/sphinxext-rediraffe#readme
80+
#
81+
# This extensions help us relocated content without breaking links. If a
82+
# document is moved internally, we should configure a redirect like below.
83+
#
84+
rediraffe_branch = "main"
85+
rediraffe_redirects = {
86+
# "old-file": "new-folder/new-file-name",
87+
}
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../contrib/theia/README.rst
File renamed without changes.

docs/index.rst renamed to docs/source/index.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The primary use cases are:
2121
JupyterLab extensions) to access web APIs of other processes
2222
running locally in a safe manner. This is used by the `JupyterLab
2323
extension <https://github.com/dask/dask-labextension>`_ for
24-
`dask <https://dask.org/>`_.
24+
`dask <https://www.dask.org/>`_.
2525

2626

2727
Contents
@@ -72,3 +72,11 @@ Contributions of all kinds - documentation, issues, blog posts, code, are most w
7272

7373
contributing/release
7474
convenience/new
75+
76+
Changelog
77+
=========
78+
79+
.. toctree::
80+
:maxdepth: 2
81+
82+
changelog
File renamed without changes.

docs/launchers.rst renamed to docs/source/launchers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ menu in the notebook's default tree view. Note that a new instance
1616
is **not** launched every time you click an item - if the process
1717
is already running, it is reused.
1818

19-
.. image:: images/nbextension-tree.png
19+
.. image:: _static/images/nbextension-tree.png
2020

2121
JupyterLab Launcher Extension
2222
=============================
@@ -31,6 +31,6 @@ to provide launcher icons for registered server processes.
3131
This should provide icons for each registered process in the main
3232
JupyterLab launcher
3333

34-
.. image:: images/labextension-launcher.png
34+
.. image:: _static/images/labextension-launcher.png
3535

3636
Clicking on them will open the application in a new window.
File renamed without changes.

0 commit comments

Comments
 (0)