Skip to content
Myr

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 file

Take 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 back
1# -*- coding: utf-8 -*-
2from __future__ import print_function

Merge pull request #2676 from davidism/tutorialDavid Lordbefore adoptionc3e2ff2

line 3why, one step back
3

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

line 4why, one step back
4from pallets_sphinx_themes import ProjectLink, get_version

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 5why, one step back
5

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

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 7why, one step back
7

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 12why, one step back
12

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

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 14why, one step back
14

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 16why, one step back
16extensions = [

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

lines 17–20why, one step back
17 "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 back
21]

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

line 22why, one step back
22intersphinx_mapping = {

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

lines 23–30why, one step back
23 "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 back
31}

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 32why, one step back
32

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

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 34why, one step back
34

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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 #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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}

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 46why, one step back
46html_sidebars = {

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 49why, one step back
49}

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

lines 50–54why, one step back
50singlehtml_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 back
55html_show_sourcelink = False

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 56why, one step back
56

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

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

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

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

line 60why, one step back
60 (master_doc, "Flask.tex", "Flask Documentation", "Pallets Team", "manual")

fix doc build errorDavid Lordbefore adoptiond2a46dc

lines 61–63why, one step back
61]
62latex_use_modindex = False63latex_elements = {

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

lines 64–67why, one step back
64 "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 back
68}
69latex_use_parts = True

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

line 71why, one step back
71

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

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

fix doc build errorDavid Lordbefore adoptiond2a46dc

lines 73–74why, one step back
73
74

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

line 75why, one step back
75def 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 back
76 app = inliner.document.settings.env.app
77 release = app.config.release

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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

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

line 79why, one step back
79

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

lines 80–81why, one step back
80 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 back
82 words = words.strip()
83 else:84 words = None85

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

lines 86–87why, one step back
86 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 back
88 else:

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

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

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

lines 90–95why, one step back
90
91 if words is None:92 words = url9394 from docutils.nodes import reference95 from docutils.parsers.rst.roles import set_classes

Merge pull request #3064 from pallets/docs-fixDavid Lordbefore adoption1096e22

line 96why, one step back
96

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

lines 97–103why, one step back
97 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 back
104 app.add_role("gh", github_link)