conf.py
This file
Path
docs/conf.py
96 lines · 3.1 KiB · Python
Last changed by
Merge branch '1.0.x' into 1.1.xDavid Lordbefore adoption7fdd0df
History of this fileTake it
The walk stopped after 200 commits: lines older than be46acb point at it.
Merge branch '1.0.x' into 1.1.xDavid Lordbefore adoption7fdd0df
line 1why, one step back1import packaging.versionMerge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
lines 2–3why, one step back2from pallets_sphinx_themes import get_version3from pallets_sphinx_themes import ProjectLinkadd changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 4–6why, one step back45# Project --------------------------------------------------------------6Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 7why, one step back7project = "Flask"Merge branch '1.0.x'David Lordbefore adoption1351d0a
lines 8–9why, one step back8copyright = "2010 Pallets"9author = "Pallets"Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 10why, one step back10release, version = get_version("Flask")add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 11–13why, one step back1112# General --------------------------------------------------------------13Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 14why, one step back14master_doc = "index"add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
line 15why, one step back15extensions = [Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
lines 16–19why, one step back16 "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 back20 "sphinx_issues",add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 21–22why, one step back21]22intersphinx_mapping = {Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 23why, one step back23 "python": ("https://docs.python.org/3/", None),Merge branch '1.0.x'David Lordbefore adoption1351d0a
line 24why, one step back24 "werkzeug": ("https://werkzeug.palletsprojects.com/", None),Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4
line 25why, one step back25 "click": ("https://click.palletsprojects.com/", None),Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 26why, one step back26 "jinja": ("http://jinja.pocoo.org/docs/", None),Merge branch '1.0-maintenance'David Lordbefore adoptionf7d50d4
lines 27–29why, one step back27 "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 back30 "blinker": ("https://pythonhosted.org/blinker/", None),add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
line 31why, one step back31}Merge pull request #3174 from icreatedanaccount/masterDavid Lordbefore adoption8ef56c8
line 32why, one step back32issues_github_path = "pallets/flask"add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 33–35why, one step back3334# HTML -----------------------------------------------------------------35Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
lines 36–37why, one step back36html_theme = "flask"37html_theme_options = {"index_sidebar_logo": False}add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
line 38why, one step back38html_context = {Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
lines 39–45why, one step back39 "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 ]add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 46–47why, one step back46}47html_sidebars = {Merge branch '1.0.x'David Lordbefore adoption1351d0a
lines 48–49why, one step back48 "index": ["project.html", "localtoc.html", "searchbox.html"],49 "**": ["localtoc.html", "relations.html", "searchbox.html"],add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
line 50why, one step back50}Merge branch '1.0.x'David Lordbefore adoption1351d0a
line 51why, one step back51singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
lines 52–53why, one step back52html_static_path = ["_static"]53html_favicon = "_static/flask-icon.png"Merge branch '1.0.x'David Lordbefore adoption1351d0a
line 54why, one step back54html_logo = "_static/flask-icon.png"Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 55why, one step back55html_title = "Flask Documentation ({})".format(version)add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 56–60why, one step back56html_show_sourcelink = False5758# LaTeX ----------------------------------------------------------------5960latex_documents = [Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 61why, one step back61 (master_doc, "Flask-{}.tex".format(version), html_title, author, "manual")add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 62–66why, one step back62]6364# Local Extensions -----------------------------------------------------6566Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 67why, one step back67def github_link(name, rawtext, text, lineno, inliner, options=None, content=None):add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 68–69why, one step back68 app = inliner.document.settings.env.app69 release = app.config.releaseMerge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 70why, one step back70 base_url = "https://github.com/pallets/flask/tree/"add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
line 71why, one step back71Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
lines 72–73why, one step back72 if text.endswith(">"):73 words, text = text[:-1].rsplit("<", 1)add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 74–77why, one step back74 words = words.strip()75 else:76 words = None77Merge branch '1.0.x' into 1.1.xDavid Lordbefore adoption02cfee8
line 78why, one step back78 if packaging.version.parse(release).is_devrelease:Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 79why, one step back79 url = "{0}master/{1}".format(base_url, text)add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
line 80why, one step back80 else:Merge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 81why, one step back81 url = "{0}{1}/{2}".format(base_url, release, text)add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 82–87why, one step back8283 if words is None:84 words = url8586 from docutils.nodes import reference87 from docutils.parsers.rst.roles import set_classesMerge pull request #2912 from pallets/docs-themeDavid Lordbefore adoption19a0a7d
line 88why, one step back88add changelog for docs theme and tutorialDavid Lordbefore adoptionbe46acb
lines 89–95why, one step back89 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 back96 app.add_role("gh", github_link)