Skip to content
Myr

update sphinx config

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent d493e3e · Browse files · 9 files+16 added−80 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+16 added−80 removed

  • other:+16 added−80 removed

9 files+16 added−80 removed

deleted:docs/_static/flask-favicon.icobinary

A binary file, deleted.

added:docs/_static/flask-icon.pngbinary

A binary file, added.

added:docs/_static/flask-logo-sidebar.pngbinary

A binary file, added.

added:docs/_static/flask-logo.pngbinary

A binary file, added.

deleted:docs/_static/flask.pngbinary

A binary file, deleted.

deleted:docs/_static/logo-full.pngbinary

A binary file, deleted.

deleted:docs/_static/touch-icon.pngbinary

A binary file, deleted.

modified:docs/conf.py+11 added-78 removed
1# -*- coding: utf-8 -*-1from __future__ import print_function24import inspect5import re63from pallets_sphinx_themes import ProjectLink, get_version45# Project --------------------------------------------------------------6
4 unmodified lines
1112# General --------------------------------------------------------------1314master_doc = 'index'1915extensions = [16 'sphinx.ext.autodoc',17 'sphinx.ext.intersphinx',18 'sphinxcontrib.log_cabinet',19 'pallets_sphinx_themes',20]2621intersphinx_mapping = {22 'python': ('https://docs.python.org/3/', None),23 'werkzeug': ('http://werkzeug.pocoo.org/docs/', None),24 'click': ('http://click.pocoo.org/', None),
6 unmodified lines
3132# HTML -----------------------------------------------------------------3334html_theme = 'flask'35html_theme_options = {"index_sidebar_logo": False}36html_context = {37 'project_links': [43 ProjectLink('Donate to Pallets', 'https://psfmember.org/civicrm/contribute/transact?reset=1&id=20'),38 ProjectLink('Donate to Pallets', 'https://palletsprojects.com/donate'),39 ProjectLink('Flask Website', 'https://palletsprojects.com/p/flask/'),40 ProjectLink('PyPI releases', 'https://pypi.org/project/Flask/'),41 ProjectLink('Source Code', 'https://github.com/pallets/flask/'),47 ProjectLink(48 'Issue Tracker', 'https://github.com/pallets/flask/issues/'),42 ProjectLink('Issue Tracker', 'https://github.com/pallets/flask/issues/'),43 ],50 'canonical_url': 'http://flask.pocoo.org/docs/{}/'.format(version),51 'carbon_ads_args': 'zoneid=1673&serve=C6AILKT&placement=pocooorg',44}45html_sidebars = {54 'index': [55 'project.html',56 'versions.html',57 'carbon_ads.html',58 'searchbox.html',59 ],60 '**': [61 'localtoc.html',62 'relations.html',63 'versions.html',64 'carbon_ads.html',65 'searchbox.html',66 ]46 'index': ['project.html', "localtoc.html", 'versions.html', 'searchbox.html'],47 '**': ['localtoc.html', 'relations.html', 'versions.html', 'searchbox.html']48}49singlehtml_sidebars = {"index": ["project.html", "versions.html", "localtoc.html"]}50html_static_path = ['_static']69html_favicon = '_static/flask-favicon.ico'70html_logo = '_static/flask.png'71html_additional_pages = {72 '404': '404.html',73}51html_favicon = '_static/flask-icon.png'52html_logo = '_static/flask-logo-sidebar.png'53html_title = "Flask Documentation ({})".format(version)54html_show_sourcelink = False55html_domain_indices = False5657# LaTeX ----------------------------------------------------------------5859latex_documents = [79 (master_doc, 'Flask.tex', 'Flask Documentation', 'Pallets Team', 'manual'),60 (master_doc, 'Flask-{}.tex'.format(version), html_title, author, 'manual'),61]62latex_use_modindex = False63latex_elements = {64 'papersize': 'a4paper',
3 unmodified lines
68}69latex_use_parts = True70latex_additional_files = ['flaskstyle.sty', 'logo.pdf']7191# linkcheck ------------------------------------------------------------9293linkcheck_anchors = False9472# Local Extensions -----------------------------------------------------7397def unwrap_decorators():98 import sphinx.util.inspect as inspect99 import functools100101 old_getargspec = inspect.getargspec102 def getargspec(x):103 return old_getargspec(getattr(x, '_original_function', x))104 inspect.getargspec = getargspec105106 old_update_wrapper = functools.update_wrapper107 def update_wrapper(wrapper, wrapped, *a, **kw):108 rv = old_update_wrapper(wrapper, wrapped, *a, **kw)109 rv._original_function = wrapped110 return rv111 functools.update_wrapper = update_wrapper112113114unwrap_decorators()115del unwrap_decorators116117118_internal_mark_re = re.compile(r'^\s*:internal:\s*$(?m)', re.M)119120121def skip_internal(app, what, name, obj, skip, options):122 docstring = inspect.getdoc(obj) or ''123124 if skip or _internal_mark_re.search(docstring) is not None:125 return True126127128def cut_module_meta(app, what, name, obj, options, lines):129 """Remove metadata from autodoc output."""130 if what != 'module':131 return132133 lines[:] = [134 line for line in lines135 if not line.startswith((':copyright:', ':license:'))136 ]13713874def github_link(75 name, rawtext, text, lineno, inliner, options=None, content=None76):77 app = inliner.document.settings.env.app
22 unmodified lines
100 return [node], []101102103def setup(app):169 app.connect('autodoc-skip-member', skip_internal)170 app.connect('autodoc-process-docstring', cut_module_meta)104 app.add_role('gh', github_link)
modified:docs/index.rst+5 added-2 removed
1:orphan:23.. rst-class:: hide-header45Welcome to Flask6================76.. image:: _static/logo-full.png8.. image:: _static/flask-logo.png9 :alt: Flask: web development, one drop at a time8 :align: right10 :align: center11 :target: https://palletsprojects.com/p/flask/1213Welcome to Flask's documentation. Get started with :ref:`installation`14and then get an overview with the :ref:`quickstart`. There is also a15more detailed :ref:`tutorial` that shows how to create a small but
14 unmodified lines