python-click/docs/conf.py

60 lines
2.1 KiB
Python
Raw Normal View History

2020-07-21 08:23:42 +02:00
from pallets_sphinx_themes import get_version
from pallets_sphinx_themes import ProjectLink
2014-10-16 20:40:34 +02:00
2021-10-10 03:31:57 +02:00
import click._compat
# compat until pallets-sphinx-themes is updated
click._compat.text_type = str
2018-09-06 20:55:10 +02:00
# Project --------------------------------------------------------------
2014-10-16 20:40:34 +02:00
2018-09-06 20:55:10 +02:00
project = "Click"
2020-07-21 08:23:42 +02:00
copyright = "2014 Pallets"
author = "Pallets"
2021-10-10 03:31:57 +02:00
release, version = get_version("Click")
2014-10-16 20:40:34 +02:00
2018-09-06 20:55:10 +02:00
# General --------------------------------------------------------------
2014-10-16 20:40:34 +02:00
2018-09-06 20:55:10 +02:00
master_doc = "index"
2020-07-21 08:23:42 +02:00
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinxcontrib.log_cabinet",
"pallets_sphinx_themes",
"sphinx_issues",
2021-10-10 03:31:57 +02:00
"sphinx_tabs.tabs",
2020-07-21 08:23:42 +02:00
]
2021-10-10 03:31:57 +02:00
autodoc_typehints = "description"
2018-09-06 20:55:10 +02:00
intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
2020-07-21 08:23:42 +02:00
issues_github_path = "pallets/click"
2014-10-16 20:40:34 +02:00
2018-09-06 20:55:10 +02:00
# HTML -----------------------------------------------------------------
2014-10-16 20:40:34 +02:00
2018-09-06 20:55:10 +02:00
html_theme = "click"
2019-01-07 17:51:19 +01:00
html_theme_options = {"index_sidebar_logo": False}
2018-09-06 20:55:10 +02:00
html_context = {
"project_links": [
2021-10-10 03:31:57 +02:00
ProjectLink("Donate", "https://palletsprojects.com/donate"),
ProjectLink("PyPI Releases", "https://pypi.org/project/click/"),
2018-09-06 20:55:10 +02:00
ProjectLink("Source Code", "https://github.com/pallets/click/"),
ProjectLink("Issue Tracker", "https://github.com/pallets/click/issues/"),
2021-10-10 03:31:57 +02:00
ProjectLink("Website", "https://palletsprojects.com/p/click"),
ProjectLink("Twitter", "https://twitter.com/PalletsTeam"),
ProjectLink("Chat", "https://discord.gg/pallets"),
2018-09-06 20:55:10 +02:00
]
2014-10-16 20:40:34 +02:00
}
html_sidebars = {
2021-10-10 03:31:57 +02:00
"index": ["project.html", "localtoc.html", "searchbox.html", "ethicalads.html"],
"**": ["localtoc.html", "relations.html", "searchbox.html", "ethicalads.html"],
2014-10-16 20:40:34 +02:00
}
2021-10-10 03:31:57 +02:00
singlehtml_sidebars = {"index": ["project.html", "localtoc.html", "ethicalads.html"]}
2018-09-06 20:55:10 +02:00
html_static_path = ["_static"]
html_favicon = "_static/click-icon.png"
html_logo = "_static/click-logo-sidebar.png"
2020-07-21 08:23:42 +02:00
html_title = f"Click Documentation ({version})"
2018-09-06 20:55:10 +02:00
html_show_sourcelink = False
2014-10-16 20:40:34 +02:00
2018-09-06 20:55:10 +02:00
# LaTeX ----------------------------------------------------------------
2014-10-16 20:40:34 +02:00
2020-07-21 08:23:42 +02:00
latex_documents = [(master_doc, f"Click-{version}.tex", html_title, author, "manual")]