1 from pallets_sphinx_themes import get_version 2 from pallets_sphinx_themes import ProjectLink 3 4 # Project -------------------------------------------------------------- 5 6 project = "MarkupSafe" 7 copyright = "2010 Pallets" 8 author = "Pallets" 9 release, version = get_version("MarkupSafe") 10 11 # General -------------------------------------------------------------- 12 13 master_doc = "index" 14 extensions = [ 15 "sphinx.ext.autodoc", 16 "sphinx.ext.intersphinx", 17 "pallets_sphinx_themes", 18 "sphinxcontrib.log_cabinet", 19 "sphinx_issues", 20 ] 21 intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)} 22 issues_github_path = "pallets/markupsafe" 23 24 # HTML ----------------------------------------------------------------- 25 26 html_theme = "jinja" 27 html_theme_options = {"index_sidebar_logo": False} 28 html_context = { 29 "project_links": [ 30 ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"), 31 ProjectLink("Website", "https://palletsprojects.com/p/markupsafe/"), 32 ProjectLink("PyPI releases", "https://pypi.org/project/MarkupSafe/"), 33 ProjectLink("Source Code", "https://github.com/pallets/markupsafe/"), 34 ProjectLink("Issue Tracker", "https://github.com/pallets/markupsafe/issues/"), 35 ] 36 } 37 html_sidebars = { 38 "index": ["project.html", "localtoc.html", "searchbox.html"], 39 "**": ["localtoc.html", "relations.html", "searchbox.html"], 40 } 41 singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]} 42 html_title = f"MarkupSafe Documentation ({version})" 43 html_show_sourcelink = False 44 45 # LaTeX ---------------------------------------------------------------- 46 47 latex_documents = [ 48 (master_doc, f"MarkupSafe-{version}.tex", html_title, author, "manual") 49 ] 50