|
| 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 | +# -- Path setup -------------------------------------------------------------- |
| 7 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 8 | +# add these directories to sys.path here. If the directory is relative to the |
| 9 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 10 | +# |
| 11 | +# import os |
| 12 | +# import sys |
| 13 | +# sys.path.insert(0, os.path.abspath('.')) |
| 14 | +import os.path as osp |
| 15 | +import shutil |
| 16 | + |
| 17 | +HERE = osp.abspath(osp.dirname(__file__)) |
| 18 | + |
| 19 | +# -- Project information ----------------------------------------------------- |
| 20 | + |
| 21 | +project = "Jupyter Releaser" |
| 22 | +copyright = "2021, Project Jupyter" |
| 23 | +author = "Project Jupyter" |
| 24 | + |
| 25 | +# The full version, including alpha/beta/rc tags. |
| 26 | +release = "0.7.4" |
| 27 | +# The short X.Y version. |
| 28 | +version = ".".join(release.split(".")[:2]) |
| 29 | + |
| 30 | +# -- General configuration --------------------------------------------------- |
| 31 | + |
| 32 | +# Add any Sphinx extension module names here, as strings. They can be |
| 33 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 34 | +# ones. |
| 35 | +extensions = ["myst_parser"] |
| 36 | + |
| 37 | +myst_enable_extensions = ["html_image"] |
| 38 | + |
| 39 | +# Add any paths that contain templates here, relative to this directory. |
| 40 | +templates_path = ["_templates"] |
| 41 | + |
| 42 | +# List of patterns, relative to source directory, that match files and |
| 43 | +# directories to ignore when looking for source files. |
| 44 | +# This pattern also affects html_static_path and html_extra_path. |
| 45 | +exclude_patterns = [] |
| 46 | + |
| 47 | + |
| 48 | +# -- Options for HTML output ------------------------------------------------- |
| 49 | + |
| 50 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 51 | +# a list of builtin themes. |
| 52 | +# |
| 53 | +html_theme = "pydata_sphinx_theme" |
| 54 | + |
| 55 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 56 | +# relative to this directory. They are copied after the builtin static files, |
| 57 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 58 | +html_static_path = ["_static"] |
| 59 | + |
| 60 | +# Add an Edit this Page button |
| 61 | +html_theme_options = { |
| 62 | + "use_edit_page_button": True, |
| 63 | +} |
| 64 | + |
| 65 | +# Output for github to be used in links |
| 66 | +html_context = { |
| 67 | + "github_user": "jupyterlab", # Username |
| 68 | + "github_repo": "jupyterlab_server", # Repo name |
| 69 | + "github_version": "master", # Version |
| 70 | + "doc_path": "/docs/source/", # Path in the checkout to the docs root |
| 71 | +} |
| 72 | + |
| 73 | + |
| 74 | +def setup(app): |
| 75 | + dest = osp.join(HERE, "changelog.md") |
| 76 | + shutil.copy(osp.join(HERE, "..", "..", "CHANGELOG.md"), dest) |
0 commit comments