conf.py
This file
Path
docs/conf.py
104 lines · 3.3 KiB · Python
Last changed by
Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
History of this fileTake it
The walk stopped after 200 commits: lines older than d2a46dc point at it.
fix doc build errorDavid Lordbefore adoptiond2a46dc
lines 1–2why, one step back1# -*- coding: utf-8 -*-2from __future__ import print_functionMerge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2
line 3why, one step back3Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 4why, one step back4from pallets_sphinx_themes import ProjectLink, get_versionfix doc build errorDavid Lordbefore adoptiond2a46dc
line 5why, one step back5Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 6why, one step back6# Project --------------------------------------------------------------fix doc build errorDavid Lordbefore adoptiond2a46dc
line 7why, one step back7Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 8–11why, one step back8project = "Flask"9copyright = "2010 Pallets Team"10author = "Pallets Team"11release, version = get_version("Flask")fix doc build errorDavid Lordbefore adoptiond2a46dc
line 12why, one step back12Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 13why, one step back13# General --------------------------------------------------------------fix doc build errorDavid Lordbefore adoptiond2a46dc
line 14why, one step back14Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 15why, one step back15master_doc = "index"fix doc build errorDavid Lordbefore adoptiond2a46dc
line 16why, one step back16extensions = [Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 17–20why, one step back17 "sphinx.ext.autodoc",18 "sphinx.ext.intersphinx",19 "sphinxcontrib.log_cabinet",20 "pallets_sphinx_themes",fix doc build errorDavid Lordbefore adoptiond2a46dc
line 21why, one step back21]Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 22why, one step back22intersphinx_mapping = {Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 23–30why, one step back23 "python": ("https://docs.python.org/3/", None),24 "werkzeug": ("http://werkzeug.pocoo.org/docs/", None),25 "click": ("https://click.palletsprojects.com/", None),26 "jinja": ("http://jinja.pocoo.org/docs/", None),27 "itsdangerous": ("https://itsdangerous.palletsprojects.com/", None),28 "sqlalchemy": ("https://docs.sqlalchemy.org/", None),29 "wtforms": ("https://wtforms.readthedocs.io/en/stable/", None),30 "blinker": ("https://pythonhosted.org/blinker/", None),Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 31why, one step back31}fix doc build errorDavid Lordbefore adoptiond2a46dc
line 32why, one step back32Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 33why, one step back33# HTML -----------------------------------------------------------------fix doc build errorDavid Lordbefore adoptiond2a46dc
line 34why, one step back34Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 35–36why, one step back35html_theme = "flask"36html_theme_options = {"index_sidebar_logo": False}Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 37why, one step back37html_context = {Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 38–44why, one step back38 "project_links": [39 ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"),40 ProjectLink("Flask Website", "https://palletsprojects.com/p/flask/"),41 ProjectLink("PyPI releases", "https://pypi.org/project/Flask/"),42 ProjectLink("Source Code", "https://github.com/pallets/flask/"),43 ProjectLink("Issue Tracker", "https://github.com/pallets/flask/issues/"),44 ]Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 45why, one step back45}fix doc build errorDavid Lordbefore adoptiond2a46dc
line 46why, one step back46html_sidebars = {Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 47–48why, one step back47 "index": ["project.html", "localtoc.html", "searchbox.html"],48 "**": ["localtoc.html", "relations.html", "searchbox.html"],fix doc build errorDavid Lordbefore adoptiond2a46dc
line 49why, one step back49}Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 50–54why, one step back50singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}51html_static_path = ["_static"]52html_favicon = "_static/flask-favicon.ico"53html_logo = "_static/flask.png"54html_title = "Flask Documentation ({})".format(version)Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 55why, one step back55html_show_sourcelink = Falsefix doc build errorDavid Lordbefore adoptiond2a46dc
line 56why, one step back56Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 57why, one step back57# LaTeX ----------------------------------------------------------------fix doc build errorDavid Lordbefore adoptiond2a46dc
lines 58–59why, one step back5859latex_documents = [Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 60why, one step back60 (master_doc, "Flask.tex", "Flask Documentation", "Pallets Team", "manual")fix doc build errorDavid Lordbefore adoptiond2a46dc
lines 61–63why, one step back61]62latex_use_modindex = False63latex_elements = {Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 64–67why, one step back64 "papersize": "a4paper",65 "pointsize": "12pt",66 "fontpkg": r"\usepackage{mathpazo}",67 "preamble": r"\usepackage{flaskstyle}",fix doc build errorDavid Lordbefore adoptiond2a46dc
lines 68–69why, one step back68}69latex_use_parts = TrueMerge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 70why, one step back70latex_additional_files = ["flaskstyle.sty", "logo.pdf"]fix doc build errorDavid Lordbefore adoptiond2a46dc
line 71why, one step back71Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 72why, one step back72# Local Extensions -----------------------------------------------------fix doc build errorDavid Lordbefore adoptiond2a46dc
lines 73–74why, one step back7374Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 75why, one step back75def github_link(name, rawtext, text, lineno, inliner, options=None, content=None):Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
lines 76–77why, one step back76 app = inliner.document.settings.env.app77 release = app.config.releaseMerge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 78why, one step back78 base_url = "https://github.com/pallets/flask/tree/"Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 79why, one step back79Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 80–81why, one step back80 if text.endswith(">"):81 words, text = text[:-1].rsplit("<", 1)Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
lines 82–85why, one step back82 words = words.strip()83 else:84 words = None85Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
lines 86–87why, one step back86 if release.endswith("dev"):87 url = "{0}master/{1}".format(base_url, text)Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
line 88why, one step back88 else:Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 89why, one step back89 url = "{0}{1}/{2}".format(base_url, release, text)Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
lines 90–95why, one step back9091 if words is None:92 words = url9394 from docutils.nodes import reference95 from docutils.parsers.rst.roles import set_classesMerge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 96why, one step back96Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092
lines 97–103why, one step back97 options = options or {}98 set_classes(options)99 node = reference(rawtext, words, refuri=url, **options)100 return [node], []101102103def setup(app):Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22
line 104why, one step back104 app.add_role("gh", github_link)