|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# |
| 13 | +# import os |
| 14 | +# import sys |
| 15 | +# sys.path.insert(0, os.path.abspath('.')) |
| 16 | +import os.path as osp |
| 17 | +import shutil |
| 18 | + |
| 19 | +HERE = osp.abspath(osp.dirname(__file__)) |
| 20 | + |
| 21 | +# -- Project information ----------------------------------------------------- |
| 22 | + |
| 23 | +project = 'JupyterLab Server' |
| 24 | +copyright = '2021, Project Jupyter' |
| 25 | +author = 'Project Jupyter' |
| 26 | + |
| 27 | +# The full version, including alpha/beta/rc tags |
| 28 | +_version_py = osp.join(HERE, '..', '..', 'jupyterlab_server', '_version.py') |
| 29 | +version_ns = {} |
| 30 | + |
| 31 | +with open(_version_py, mode='r') as version_file: |
| 32 | + exec(version_file.read(), version_ns) |
| 33 | + |
| 34 | +# The short X.Y version. |
| 35 | +version = '%i.%i' % version_ns['version_info'][:2] |
| 36 | +# The full version, including alpha/beta/rc tags. |
| 37 | +release = version_ns['__version__'] |
| 38 | + |
| 39 | + |
| 40 | +# -- General configuration --------------------------------------------------- |
| 41 | + |
| 42 | +# Add any Sphinx extension module names here, as strings. They can be |
| 43 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 44 | +# ones. |
| 45 | +extensions = [ |
| 46 | + 'myst_parser', |
| 47 | + 'autodoc_traits', |
| 48 | + 'sphinx.ext.autodoc', |
| 49 | + 'sphinx.ext.intersphinx', |
| 50 | + 'sphinx.ext.mathjax', |
| 51 | + 'sphinx_copybutton' |
| 52 | +] |
| 53 | + |
| 54 | +myst_enable_extensions = ["html_image"] |
| 55 | + |
| 56 | +# Add any paths that contain templates here, relative to this directory. |
| 57 | +templates_path = ['_templates'] |
| 58 | + |
| 59 | +# List of patterns, relative to source directory, that match files and |
| 60 | +# directories to ignore when looking for source files. |
| 61 | +# This pattern also affects html_static_path and html_extra_path. |
| 62 | +exclude_patterns = [] |
| 63 | + |
| 64 | + |
| 65 | +# -- Options for HTML output ------------------------------------------------- |
| 66 | + |
| 67 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 68 | +# a list of builtin themes. |
| 69 | +# |
| 70 | +# |
| 71 | +html_theme = "pydata_sphinx_theme" |
| 72 | + |
| 73 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 74 | +# relative to this directory. They are copied after the builtin static files, |
| 75 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 76 | +html_static_path = ['_static'] |
| 77 | + |
| 78 | +# Output for github to be used in links |
| 79 | +html_context = { |
| 80 | + "display_github": True, # Integrate GitHub |
| 81 | + "github_user": "jupyterlab", # Username |
| 82 | + "github_repo": "jupyterlab_server", # Repo name |
| 83 | + "github_version": "master", # Version |
| 84 | + "conf_py_path": "/docs/source/", # Path in the checkout to the docs root |
| 85 | +} |
| 86 | + |
| 87 | + |
| 88 | +def setup(app): |
| 89 | + dest = osp.join(HERE, 'changelog.md') |
| 90 | + shutil.copy(osp.join(HERE, '..', '..', 'CHANGELOG.md'), dest) |
0 commit comments