Skip to content

Commit

Permalink
DOC: switch to source code link button (#516)
Browse files Browse the repository at this point in the history
* MAINT: remove docstring from `conf.py`
* MAINT: remove redundant `master_doc` and `source_suffix`
* MAINT: sort `html_theme_options`
  • Loading branch information
redeboer authored Jan 20, 2024
1 parent 4fe7b70 commit eec7322
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
"""Configuration file for the Sphinx documentation builder.
This file only contains a selection of the most common options. For a full list see the
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

from __future__ import annotations

import os
Expand Down Expand Up @@ -179,14 +173,6 @@ def get_tensorflow_url() -> str:
"type": "url",
},
],
"logo": {"text": REPO_TITLE},
"repository_url": f"https://github.com/{ORGANIZATION}/{REPO_NAME}",
"repository_branch": BRANCH,
"path_to_docs": "docs",
"use_download_button": True,
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
"launch_buttons": {
"binderhub_url": "https://mybinder.org",
"colab_url": "https://colab.research.google.com",
Expand All @@ -195,8 +181,17 @@ def get_tensorflow_url() -> str:
"thebe": True,
"thebelab": True,
},
"logo": {"text": REPO_TITLE},
"path_to_docs": "docs",
"repository_branch": BRANCH,
"repository_url": f"https://github.com/{ORGANIZATION}/{REPO_NAME}",
"show_navbar_depth": 2,
"show_toc_level": 2,
"use_download_button": False,
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
"use_source_button": True,
}
html_title = REPO_TITLE
intersphinx_mapping = {
Expand All @@ -222,7 +217,6 @@ def get_tensorflow_url() -> str:
linkcheck_ignore = [
"https://unix.stackexchange.com/a/129144",
]
master_doc = "index"
modindex_common_prefix = [f"{PACKAGE}."]
myst_enable_extensions = [
"amsmath",
Expand Down Expand Up @@ -257,11 +251,6 @@ def get_tensorflow_url() -> str:
project = REPO_TITLE
pygments_style = "sphinx"
release = get_package_version("tensorwaves")
source_suffix = {
".ipynb": "myst-nb",
".md": "myst-nb",
".rst": "restructuredtext",
}
thebe_config = {
"repository_url": html_theme_options["repository_url"],
"repository_branch": html_theme_options["repository_branch"],
Expand Down

0 comments on commit eec7322

Please sign in to comment.