Skip to content
Myr

conf.py

This file

Path

docs/conf.py

97 lines · 3.1 KiB · Python

Last changed by

Merge branch '1.0.x' into 1.1.xDavid Lordbefore adoption02cfee8

History of this file

Take it

The walk stopped after 200 commits: lines older than d24bb9e point at it.

Merge branch '1.0.x' into 1.1.xDavid Lordbefore adoption02cfee8

lines 1–2why, one step back
1import packaging
2

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

lines 3–4why, one step back
3from pallets_sphinx_themes import get_version
4from pallets_sphinx_themes import ProjectLink

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 5why, one step back
5

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 6why, one step back
6# Project --------------------------------------------------------------

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 7why, one step back
7

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 8why, one step back
8project = "Flask"

Merge branch '1.0.x'David Lordbefore adoption1351d0a

lines 9–10why, one step back
9copyright = "2010 Pallets"
10author = "Pallets"

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 11why, one step back
11release, version = get_version("Flask")

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 12why, one step back
12

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 13why, one step back
13# General --------------------------------------------------------------

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 14why, one step back
14

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 15why, one step back
15master_doc = "index"

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 16why, one step back
16extensions = [

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

lines 17–20why, one step back
17 "sphinx.ext.autodoc",
18 "sphinx.ext.intersphinx",19 "sphinxcontrib.log_cabinet",20 "pallets_sphinx_themes",

Merge pull request #3174 from icreatedanaccount/masterDavid Lordbefore adoption8ef56c8

line 21why, one step back
21 "sphinx_issues",

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 22why, one step back
22]

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 23why, one step back
23intersphinx_mapping = {

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 24why, one step back
24 "python": ("https://docs.python.org/3/", None),

Merge branch '1.0.x'David Lordbefore adoption1351d0a

line 25why, one step back
25 "werkzeug": ("https://werkzeug.palletsprojects.com/", None),

Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4

line 26why, one step back
26 "click": ("https://click.palletsprojects.com/", None),

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 27why, one step back
27 "jinja": ("http://jinja.pocoo.org/docs/", None),

Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4

lines 28–30why, one step back
28 "itsdangerous": ("https://itsdangerous.palletsprojects.com/", None),
29 "sqlalchemy": ("https://docs.sqlalchemy.org/", None),30 "wtforms": ("https://wtforms.readthedocs.io/en/stable/", None),

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 31why, one step back
31 "blinker": ("https://pythonhosted.org/blinker/", None),

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 32why, one step back
32}

Merge pull request #3174 from icreatedanaccount/masterDavid Lordbefore adoption8ef56c8

line 33why, one step back
33issues_github_path = "pallets/flask"

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 34why, one step back
34

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 35why, one step back
35# HTML -----------------------------------------------------------------

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 36why, one step back
36

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

lines 37–38why, one step back
37html_theme = "flask"
38html_theme_options = {"index_sidebar_logo": False}

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 39why, one step back
39html_context = {

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

lines 40–46why, one step back
40 "project_links": [
41 ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"),42 ProjectLink("Flask Website", "https://palletsprojects.com/p/flask/"),43 ProjectLink("PyPI releases", "https://pypi.org/project/Flask/"),44 ProjectLink("Source Code", "https://github.com/pallets/flask/"),45 ProjectLink("Issue Tracker", "https://github.com/pallets/flask/issues/"),46 ]

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 47why, one step back
47}

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 48why, one step back
48html_sidebars = {

Merge branch '1.0.x'David Lordbefore adoption1351d0a

lines 49–50why, one step back
49 "index": ["project.html", "localtoc.html", "searchbox.html"],
50 "**": ["localtoc.html", "relations.html", "searchbox.html"],

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 51why, one step back
51}

Merge branch '1.0.x'David Lordbefore adoption1351d0a

line 52why, one step back
52singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

lines 53–54why, one step back
53html_static_path = ["_static"]
54html_favicon = "_static/flask-icon.png"

Merge branch '1.0.x'David Lordbefore adoption1351d0a

line 55why, one step back
55html_logo = "_static/flask-icon.png"

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 56why, one step back
56html_title = "Flask Documentation ({})".format(version)

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 57why, one step back
57html_show_sourcelink = False

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

line 58why, one step back
58

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 59why, one step back
59# LaTeX ----------------------------------------------------------------

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

lines 60–61why, one step back
60
61latex_documents = [

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 62why, one step back
62 (master_doc, "Flask-{}.tex".format(version), html_title, author, "manual")

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

lines 63–64why, one step back
63]
64

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 65why, one step back
65# Local Extensions -----------------------------------------------------

Merge pull request #2525 from proog/docs-twisted-portDavid Lordbefore adoptiond24bb9e

lines 66–67why, one step back
66
67

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 68why, one step back
68def github_link(name, rawtext, text, lineno, inliner, options=None, content=None):

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

lines 69–70why, one step back
69 app = inliner.document.settings.env.app
70 release = app.config.release

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 71why, one step back
71 base_url = "https://github.com/pallets/flask/tree/"

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 72why, one step back
72

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

lines 73–74why, one step back
73 if text.endswith(">"):
74 words, text = text[:-1].rsplit("<", 1)

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

lines 75–78why, one step back
75 words = words.strip()
76 else:77 words = None78

Merge branch '1.0.x' into 1.1.xDavid Lordbefore adoption02cfee8

line 79why, one step back
79 if packaging.version.parse(release).is_devrelease:

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 80why, one step back
80 url = "{0}master/{1}".format(base_url, text)

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

line 81why, one step back
81 else:

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 82why, one step back
82 url = "{0}{1}/{2}".format(base_url, release, text)

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

lines 83–88why, one step back
83
84 if words is None:85 words = url8687 from docutils.nodes import reference88 from docutils.parsers.rst.roles import set_classes

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 89why, one step back
89

Merge pull request #2709 from davidism/docs-themeDavid Lordbefore adoption5fba092

lines 90–96why, one step back
90 options = options or {}
91 set_classes(options)92 node = reference(rawtext, words, refuri=url, **options)93 return [node], []949596def setup(app):

Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d

line 97why, one step back
97 app.add_role("gh", github_link)