|
17 | 17 | # -- Project information -----------------------------------------------------
|
18 | 18 |
|
19 | 19 | info = metadata("infercnvpy")
|
20 |
| -project = info["Name"] |
| 20 | +project_name = info["Name"] |
21 | 21 | author = info["Author"]
|
22 | 22 | copyright = f"{datetime.now():%Y}, {author}."
|
23 | 23 | version = info["Version"]
|
| 24 | +repository_url = "https://github.com/" + "grst" + "/" + project_name |
24 | 25 |
|
25 | 26 | # The full version, including alpha/beta/rc tags
|
26 | 27 | release = info["Version"]
|
|
33 | 34 | html_context = {
|
34 | 35 | "display_github": True, # Integrate GitHub
|
35 | 36 | "github_user": "icbi-lab", # Username
|
36 |
| - "github_repo": project, # Repo name |
| 37 | + "github_repo": project_name, # Repo name |
37 | 38 | "github_version": "main", # Version
|
38 | 39 | "conf_py_path": "/docs/", # Path in the checkout to the docs root
|
39 | 40 | }
|
|
43 | 44 | # Add any Sphinx extension module names here, as strings.
|
44 | 45 | # They can be extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
45 | 46 | extensions = [
|
46 |
| - "myst_parser", |
| 47 | + "myst_nb", |
| 48 | + "sphinx_copybutton", |
47 | 49 | "sphinx.ext.autodoc",
|
48 | 50 | "sphinx.ext.intersphinx",
|
49 | 51 | "sphinx.ext.autosummary",
|
50 | 52 | "sphinx.ext.napoleon",
|
51 | 53 | "sphinxcontrib.bibtex",
|
52 | 54 | "sphinx_autodoc_typehints",
|
53 |
| - "scanpydoc.definition_list_typed_field", |
54 |
| - "nbsphinx", |
55 | 55 | "sphinx.ext.mathjax",
|
56 | 56 | *[p.stem for p in (HERE / "extensions").glob("*.py")],
|
57 | 57 | ]
|
|
65 | 65 | napoleon_use_rtype = True # having a separate entry generally helps readability
|
66 | 66 | napoleon_use_param = True
|
67 | 67 | myst_heading_anchors = 3 # create anchors for h1-h3
|
| 68 | +myst_enable_extensions = [ |
| 69 | + "amsmath", |
| 70 | + "colon_fence", |
| 71 | + "deflist", |
| 72 | + "dollarmath", |
| 73 | + "html_image", |
| 74 | + "html_admonition", |
| 75 | +] |
| 76 | +myst_url_schemes = ("http", "https", "mailto") |
| 77 | +nb_output_stderr = "remove" |
| 78 | +nb_execution_mode = "off" |
| 79 | +nb_merge_streams = True |
| 80 | +typehints_defaults = "braces" |
| 81 | + |
| 82 | +source_suffix = { |
| 83 | + ".rst": "restructuredtext", |
| 84 | + ".ipynb": "myst-nb", |
| 85 | + ".myst": "myst-nb", |
| 86 | +} |
68 | 87 |
|
69 | 88 | intersphinx_mapping = {
|
70 | 89 | "scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
|
|
95 | 114 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
96 | 115 | # a list of builtin themes.
|
97 | 116 | #
|
98 |
| -html_theme = "furo" |
| 117 | +html_theme = "sphinx_book_theme" |
99 | 118 | html_static_path = ["_static"]
|
| 119 | +html_title = project_name |
| 120 | + |
| 121 | +html_theme_options = { |
| 122 | + "repository_url": repository_url, |
| 123 | + "use_repository_button": True, |
| 124 | +} |
100 | 125 |
|
101 |
| -pygments_style = "sphinx" |
| 126 | +pygments_style = "default" |
102 | 127 |
|
103 | 128 | nitpick_ignore = [
|
104 | 129 | # If building the documentation fails because of a missing link that is outside your control,
|
|
0 commit comments