Skip to content
Myr

conf.py

This file

Path

docs/conf.py

96 lines · 3.1 KiB · Python

Last changed by

Merge branch '1.1.x'David Lordbefore adoptiona3f0782

History of this file

Take it

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

Merge branch '1.1.x'David Lordbefore adoptiona3f0782

line 1why, one step back
1import packaging.version

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 4why, one step back
4

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 6why, one step back
6

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

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

Merge branch '1.0.x'David Lordbefore adoption1351d0a

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

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 11why, one step back
11

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 13why, one step back
13

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 15why, one step back
15extensions = [

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

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

Merge pull request #3174 from icreatedanaccount/masterDavid Lordbefore adoption8ef56c8

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 21why, one step back
21]

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

line 22why, one step back
22intersphinx_mapping = {

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

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

Merge branch '1.0.x'David Lordbefore adoption1351d0a

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

Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4

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

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

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

Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4

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

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

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

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

line 31why, one step back
31}

Merge pull request #3174 from icreatedanaccount/masterDavid Lordbefore adoption8ef56c8

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 33why, one step back
33

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 35why, one step back
35

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

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

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

line 38why, one step back
38html_context = {

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

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

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

line 46why, one step back
46}

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 47why, one step back
47html_sidebars = {

Merge branch '1.0.x'David Lordbefore adoption1351d0a

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 50why, one step back
50}

Merge branch '1.0.x'David Lordbefore adoption1351d0a

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

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

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

Merge branch '1.0.x'David Lordbefore adoption1351d0a

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

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

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

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

line 56why, one step back
56html_show_sourcelink = False

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

line 57why, one step back
57

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

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

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

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

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

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

Merge pull request #2606 from pallets/run-sslDavid Lordbefore adoption8ff0cef

lines 65–66why, one step back
65
66

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

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

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

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

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

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

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

line 71why, one step back
71

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

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

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

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

Merge branch '1.1.x'David Lordbefore adoption0adbaf2

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

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

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

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

line 80why, one step back
80 else:

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

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

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

lines 82–87why, one step back
82
83 if words is None:84 words = url8586 from docutils.nodes import reference87 from docutils.parsers.rst.roles import set_classes

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

line 88why, one step back
88

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

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

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

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