Skip to content
Myr

conf.py

This file

Path

docs/conf.py

105 lines · 3.4 KiB · Python

Last changed by

Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4

History of this file

Take it

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

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 1why, one step back
1from __future__ import print_function

Merge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2

line 2why, one step back
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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 7why, one step back
7

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

lines 8–11why, one step back
8project = "Flask"
9copyright = "2010 Pallets Team"10author = "Pallets Team"11release, version = get_version("Flask")

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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

lines 23–24why, one step back
23 "python": ("https://docs.python.org/3/", None),
24 "werkzeug": ("http://werkzeug.pocoo.org/docs/", 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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 32why, one step back
32

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

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

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 34why, one step back
34

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

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

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

line 37why, one step back
37html_context = {

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

lines 38–44why, one step back
38 "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 back
45}

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 46why, one step back
46html_sidebars = {

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

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

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 49why, one step back
49}

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

lines 50–54why, one step back
50singlehtml_sidebars = {"index": ["project.html", "versions.html", "localtoc.html"]}
51html_static_path = ["_static"]52html_favicon = "_static/flask-icon.png"53html_logo = "_static/flask-logo-sidebar.png"54html_title = "Flask Documentation ({})".format(version)

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

line 55why, one step back
55html_show_sourcelink = False

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

line 56why, one step back
56html_domain_indices = False

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

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 #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

lines 62–64why, one step back
62]
63latex_use_modindex = False64latex_elements = {

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

lines 65–68why, one step back
65 "papersize": "a4paper",
66 "pointsize": "12pt",67 "fontpkg": r"\usepackage{mathpazo}",68 "preamble": r"\usepackage{flaskstyle}",

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

lines 69–70why, one step back
69}
70latex_use_parts = True

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

line 71why, one step back
71latex_additional_files = ["flaskstyle.sty", "logo.pdf"]

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

line 72why, one step back
72

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

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

Merge pull request #2352 from davidism/json-object-hookDavid Lordbefore adoption62406e6

lines 74–75why, one step back
74
75

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

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

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

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

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

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

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

line 80why, one step back
80

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

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

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

lines 83–86why, one step back
83 words = words.strip()
84 else:85 words = None86

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

lines 87–88why, one step back
87 if release.endswith("dev"):
88 url = "{0}master/{1}".format(base_url, text)

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

line 89why, one step back
89 else:

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

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

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

lines 91–96why, one step back
91
92 if words is None:93 words = url9495 from docutils.nodes import reference96 from docutils.parsers.rst.roles import set_classes

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

line 97why, one step back
97

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

lines 98–104why, one step back
98 options = options or {}
99 set_classes(options)100 node = reference(rawtext, words, refuri=url, **options)101 return [node], []102103104def setup(app):

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

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