Skip to content
Myr

conf.py

This file

Path

docs/conf.py

271 lines · 8.8 KiB · Python

Last changed by

Merge pull request #1303 from Parkayun/masterMarkus Unterwaditzerbefore adoption5b98266

History of this file

Take it

1# -*- coding: utf-8 -*-2#3# Flask documentation build configuration file, created by4# sphinx-quickstart on Tue Apr  6 15:24:58 2010.5#6# This file is execfile()d with the current directory set to its containing dir.7#8# Note that not all possible configuration values are present in this9# autogenerated file.10#11# All configuration values have a default; values that are commented out12# serve to show the default.1314import sys, os1516# If extensions (or modules to document with autodoc) are in another directory,17# add these directories to sys.path here. If the directory is relative to the18# documentation root, use os.path.abspath to make it absolute, like shown here.19sys.path.append(os.path.abspath('_themes'))20sys.path.append(os.path.abspath('.'))2122# -- General configuration -----------------------------------------------------2324# If your documentation needs a minimal Sphinx version, state it here.25#needs_sphinx = '1.0'2627# Add any Sphinx extension module names here, as strings. They can be extensions28# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.29extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',30              'flaskdocext']3132# Add any paths that contain templates here, relative to this directory.33templates_path = ['_templates']3435# The suffix of source filenames.36source_suffix = '.rst'3738# The encoding of source files.39#source_encoding = 'utf-8-sig'4041# The master toctree document.42master_doc = 'index'4344# General information about the project.45project = u'Flask'46copyright = u'2015, Armin Ronacher'4748# The version info for the project you're documenting, acts as replacement for49# |version| and |release|, also used in various other places throughout the50# built documents.51import pkg_resources52try:53    release = pkg_resources.get_distribution('Flask').version54except pkg_resources.DistributionNotFound:55    print 'To build the documentation, The distribution information of Flask'56    print 'Has to be available.  Either install the package into your'57    print 'development environment or run "setup.py develop" to setup the'58    print 'metadata.  A virtualenv is recommended!'59    sys.exit(1)60del pkg_resources6162if 'dev' in release:63    release = release.split('dev')[0] + 'dev'64version = '.'.join(release.split('.')[:2])6566# The language for content autogenerated by Sphinx. Refer to documentation67# for a list of supported languages.68#language = None6970# There are two options for replacing |today|: either, you set today to some71# non-false value, then it is used:72#today = ''73# Else, today_fmt is used as the format for a strftime call.74#today_fmt = '%B %d, %Y'7576# List of patterns, relative to source directory, that match files and77# directories to ignore when looking for source files.78exclude_patterns = ['_build']7980# The reST default role (used for this markup: `text`) to use for all documents.81#default_role = None8283# If true, '()' will be appended to :func: etc. cross-reference text.84#add_function_parentheses = True8586# If true, the current module name will be prepended to all description87# unit titles (such as .. function::).88#add_module_names = True8990# If true, sectionauthor and moduleauthor directives will be shown in the91# output. They are ignored by default.92#show_authors = False9394# A list of ignored prefixes for module index sorting.95#modindex_common_prefix = []969798# -- Options for HTML output ---------------------------------------------------99100# The theme to use for HTML and HTML Help pages.  Major themes that come with101# Sphinx are currently 'default' and 'sphinxdoc'.102html_theme = 'flask'103104# Theme options are theme-specific and customize the look and feel of a theme105# further.  For a list of options available for each theme, see the106# documentation.107html_theme_options = {108    'touch_icon':   'touch-icon.png'109}110111# Add any paths that contain custom themes here, relative to this directory.112html_theme_path = ['_themes']113114# The name for this set of Sphinx documents.  If None, it defaults to115# "<project> v<release> documentation".116#html_title = None117118# A shorter title for the navigation bar.  Default is the same as html_title.119#html_short_title = None120121# The name of an image file (relative to this directory) to place at the top122# of the sidebar.  Do not set, template magic!123#html_logo = None124125# The name of an image file (within the static path) to use as favicon of the126# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32127# pixels large.128html_favicon = "flask-favicon.ico"129130# Add any paths that contain custom static files (such as style sheets) here,131# relative to this directory. They are copied after the builtin static files,132# so a file named "default.css" will overwrite the builtin "default.css".133html_static_path = ['_static']134135# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,136# using the given strftime format.137#html_last_updated_fmt = '%b %d, %Y'138139# If true, SmartyPants will be used to convert quotes and dashes to140# typographically correct entities.141#html_use_smartypants = True142143# Custom sidebar templates, maps document names to template names.144html_sidebars = {145    'index':    ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],146    '**':       ['sidebarlogo.html', 'localtoc.html', 'relations.html',147                 'sourcelink.html', 'searchbox.html']148}149150# Additional templates that should be rendered to pages, maps page names to151# template names.152#html_additional_pages = {}153154# If false, no module index is generated.155html_use_modindex = False156157# If false, no index is generated.158#html_use_index = True159160# If true, the index is split into individual pages for each letter.161#html_split_index = False162163# If true, links to the reST sources are added to the pages.164#html_show_sourcelink = True165166# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.167html_show_sphinx = False168169# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.170#html_show_copyright = True171172# If true, an OpenSearch description file will be output, and all pages will173# contain a <link> tag referring to it.  The value of this option must be the174# base URL from which the finished HTML is served.175#html_use_opensearch = ''176177# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").178#html_file_suffix = ''179180# Output file base name for HTML help builder.181htmlhelp_basename = 'Flaskdoc'182183184# -- Options for LaTeX output --------------------------------------------------185186# Grouping the document tree into LaTeX files. List of tuples187# (source start file, target name, title, author, documentclass [howto/manual]).188latex_documents = [189  ('latexindex', 'Flask.tex', u'Flask Documentation',190   u'Armin Ronacher', 'manual'),191]192193# Documents to append as an appendix to all manuals.194#latex_appendices = []195196# If false, no module index is generated.197latex_use_modindex = False198199latex_elements = {200    'fontpkg':      r'\usepackage{mathpazo}',201    'papersize':    'a4paper',202    'pointsize':    '12pt',203    'preamble':     r'\usepackage{flaskstyle}'204}205latex_use_parts = True206207latex_additional_files = ['flaskstyle.sty', 'logo.pdf']208209210# -- Options for Epub output ---------------------------------------------------211212# Bibliographic Dublin Core info.213#epub_title = ''214#epub_author = ''215#epub_publisher = ''216#epub_copyright = ''217218# The language of the text. It defaults to the language option219# or en if the language is not set.220#epub_language = ''221222# The scheme of the identifier. Typical schemes are ISBN or URL.223#epub_scheme = ''224225# The unique identifier of the text. This can be a ISBN number226# or the project homepage.227#epub_identifier = ''228229# A unique identification for the text.230#epub_uid = ''231232# HTML files that should be inserted before the pages created by sphinx.233# The format is a list of tuples containing the path and title.234#epub_pre_files = []235236# HTML files shat should be inserted after the pages created by sphinx.237# The format is a list of tuples containing the path and title.238#epub_post_files = []239240# A list of files that should not be packed into the epub file.241#epub_exclude_files = []242243# The depth of the table of contents in toc.ncx.244#epub_tocdepth = 3245246intersphinx_mapping = {247    'https://docs.python.org/dev': None,248    'http://werkzeug.pocoo.org/docs/': None,249    'http://click.pocoo.org/': None,250    'http://jinja.pocoo.org/docs/': None,251    'http://www.sqlalchemy.org/docs/': None,252    'https://wtforms.readthedocs.org/en/latest/': None,253    'https://pythonhosted.org/blinker/': None254}255256pygments_style = 'flask_theme_support.FlaskyStyle'257258# fall back if theme is not there259try:260    __import__('flask_theme_support')261except ImportError, e:262    print '-' * 74263    print 'Warning: Flask themes unavailable.  Building with default theme'264    print 'If you want the Flask themes, run this command and build again:'265    print266    print '  git submodule update --init'267    print '-' * 74268269    pygments_style = 'tango'270    html_theme = 'default'271    html_theme_options = {}