python-click/docs/conf.py

51 lines
1.8 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
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"
2019-01-07 17:51:19 +01:00
release, version = get_version("Click", version_length=1)
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",
]
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": [
ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"),
ProjectLink("Click Website", "https://palletsprojects.com/p/click/"),
2020-07-21 08:23:42 +02:00
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/"),
]
2014-10-16 20:40:34 +02:00
}
html_sidebars = {
2020-07-21 08:23:42 +02:00
"index": ["project.html", "localtoc.html", "searchbox.html"],
"**": ["localtoc.html", "relations.html", "searchbox.html"],
2014-10-16 20:40:34 +02:00
}
2020-07-21 08:23:42 +02:00
singlehtml_sidebars = {"index": ["project.html", "localtoc.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")]