conf.py
This file
Path
docs/conf.py
251 lines · 8.2 KiB · Python
Last changed by
Added message that setup.py develop is required to build the docsArmin Ronacherbefore adoption1ffa295
History of this fileTake it
The walk stopped after 200 commits: lines older than 9f0b242 point at it.
The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 1–18why, one step back1# -*- 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.Merge branch 'master' into module-supportArmin Ronacherbefore adoption9fa4f94
line 19why, one step back19sys.path.append(os.path.abspath('_themes'))The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 20–48why, one step back2021# -- General configuration -----------------------------------------------------2223# If your documentation needs a minimal Sphinx version, state it here.24#needs_sphinx = '1.0'2526# Add any Sphinx extension module names here, as strings. They can be extensions27# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.28extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']2930# Add any paths that contain templates here, relative to this directory.31templates_path = ['_templates']3233# The suffix of source filenames.34source_suffix = '.rst'3536# The encoding of source files.37#source_encoding = 'utf-8-sig'3839# The master toctree document.40master_doc = 'index'4142# General information about the project.43project = u'Flask'44copyright = u'2010, Armin Ronacher'4546# The version info for the project you're documenting, acts as replacement for47# |version| and |release|, also used in various other places throughout the48# built documents.Added message that setup.py develop is required to build the docsArmin Ronacherbefore adoption1ffa295
lines 49–59why, one step back49import pkg_resources50try:51 release = pkg_resources.get_distribution('Flask').version52except pkg_resources.DistributionNotFound:53 print 'To build the documentation, The distribution information of Flask'54 print 'Has to be available. Either install the package into your'55 print 'development environment or run "setup.py develop" to setup the'56 print 'metadata. A virtualenv is recommended!'57 sys.exit(1)58del pkg_resources59Fixed a doc config errorArmin Ronacherbefore adoption54c3df6
lines 60–61why, one step back60if 'dev' in release:61 release = release.split('dev')[0] + 'dev'The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 62–99why, one step back62version = '.'.join(release.split('.')[:2])6364# The language for content autogenerated by Sphinx. Refer to documentation65# for a list of supported languages.66#language = None6768# There are two options for replacing |today|: either, you set today to some69# non-false value, then it is used:70#today = ''71# Else, today_fmt is used as the format for a strftime call.72#today_fmt = '%B %d, %Y'7374# List of patterns, relative to source directory, that match files and75# directories to ignore when looking for source files.76exclude_patterns = ['_build']7778# The reST default role (used for this markup: `text`) to use for all documents.79#default_role = None8081# If true, '()' will be appended to :func: etc. cross-reference text.82#add_function_parentheses = True8384# If true, the current module name will be prepended to all description85# unit titles (such as .. function::).86#add_module_names = True8788# If true, sectionauthor and moduleauthor directives will be shown in the89# output. They are ignored by default.90#show_authors = False9192# A list of ignored prefixes for module index sorting.93#modindex_common_prefix = []949596# -- Options for HTML output ---------------------------------------------------9798# The theme to use for HTML and HTML Help pages. Major themes that come with99# Sphinx are currently 'default' and 'sphinxdoc'.Merge branch 'master' into module-supportArmin Ronacherbefore adoption9fa4f94
line 100why, one step back100html_theme = 'flask'The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 101–104why, one step back101102# Theme options are theme-specific and customize the look and feel of a theme103# further. For a list of options available for each theme, see the104# documentation.Fixed a build error and added a touch iconArmin Ronacherbefore adoption8d356d7
lines 105–107why, one step back105html_theme_options = {106 'touch_icon': 'touch-icon.png'107}The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 108–152why, one step back108109# Add any paths that contain custom themes here, relative to this directory.110html_theme_path = ['_themes']111112# The name for this set of Sphinx documents. If None, it defaults to113# "<project> v<release> documentation".114#html_title = None115116# A shorter title for the navigation bar. Default is the same as html_title.117#html_short_title = None118119# The name of an image file (relative to this directory) to place at the top120# of the sidebar. Do not set, template magic!121#html_logo = None122123# The name of an image file (within the static path) to use as favicon of the124# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32125# pixels large.126#html_favicon = None127128# Add any paths that contain custom static files (such as style sheets) here,129# relative to this directory. They are copied after the builtin static files,130# so a file named "default.css" will overwrite the builtin "default.css".131html_static_path = ['_static']132133# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,134# using the given strftime format.135#html_last_updated_fmt = '%b %d, %Y'136137# If true, SmartyPants will be used to convert quotes and dashes to138# typographically correct entities.139#html_use_smartypants = True140141# Custom sidebar templates, maps document names to template names.142html_sidebars = {143 'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],144 '**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',145 'sourcelink.html', 'searchbox.html']146}147148# Additional templates that should be rendered to pages, maps page names to149# template names.150#html_additional_pages = {}151152# If false, no module index is generated.Added lazyloading pattern and explicit chapter links in tutorial.Armin Ronacherbefore adoption9d19b77
line 153why, one step back153html_use_modindex = FalseThe testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 154–164why, one step back154155# If false, no index is generated.156#html_use_index = True157158# If true, the index is split into individual pages for each letter.159#html_split_index = False160161# If true, links to the reST sources are added to the pages.162#html_show_sourcelink = True163164# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.Added lazyloading pattern and explicit chapter links in tutorial.Armin Ronacherbefore adoption9d19b77
line 165why, one step back165html_show_sphinx = FalseThe testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 166–186why, one step back166167# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.168#html_show_copyright = True169170# If true, an OpenSearch description file will be output, and all pages will171# contain a <link> tag referring to it. The value of this option must be the172# base URL from which the finished HTML is served.173#html_use_opensearch = ''174175# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").176#html_file_suffix = ''177178# Output file base name for HTML help builder.179htmlhelp_basename = 'Flaskdoc'180181182# -- Options for LaTeX output --------------------------------------------------183184# Grouping the document tree into LaTeX files. List of tuples185# (source start file, target name, title, author, documentclass [howto/manual]).186latex_documents = [Merge branch 'master' into module-supportArmin Ronacherbefore adoption41de129
line 187why, one step back187 ('latexindex', 'Flask.tex', u'Flask Documentation',The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 188–194why, one step back188 u'Armin Ronacher', 'manual'),189]190191# Documents to append as an appendix to all manuals.192#latex_appendices = []193194# If false, no module index is generated.Merge branch 'master' into module-supportArmin Ronacherbefore adoption41de129
lines 195–202why, one step back195latex_use_modindex = False196197latex_elements = {198 'fontpkg': r'\usepackage{mathpazo}',199 'papersize': 'a4paper',200 'pointsize': '12pt',201 'preamble': r'\usepackage{flaskstyle}'202}Beefed up latex output. Unfortunately parts look ugly.Armin Ronacherbefore adoptioncbcd15c
line 203why, one step back203latex_use_parts = TrueMerge branch 'master' into module-supportArmin Ronacherbefore adoption41de129
lines 204–205why, one step back204205latex_additional_files = ['flaskstyle.sty', 'logo.pdf']The testsuite skips JSON tests now is not available and runs the exampleArmin Ronacherbefore adoption9f0b242
lines 206–249why, one step back206207208# -- Options for Epub output ---------------------------------------------------209210# Bibliographic Dublin Core info.211#epub_title = ''212#epub_author = ''213#epub_publisher = ''214#epub_copyright = ''215216# The language of the text. It defaults to the language option217# or en if the language is not set.218#epub_language = ''219220# The scheme of the identifier. Typical schemes are ISBN or URL.221#epub_scheme = ''222223# The unique identifier of the text. This can be a ISBN number224# or the project homepage.225#epub_identifier = ''226227# A unique identification for the text.228#epub_uid = ''229230# HTML files that should be inserted before the pages created by sphinx.231# The format is a list of tuples containing the path and title.232#epub_pre_files = []233234# HTML files shat should be inserted after the pages created by sphinx.235# The format is a list of tuples containing the path and title.236#epub_post_files = []237238# A list of files that should not be packed into the epub file.239#epub_exclude_files = []240241# The depth of the table of contents in toc.ncx.242#epub_tocdepth = 3243244intersphinx_mapping = {245 'http://docs.python.org/dev': None,246 'http://werkzeug.pocoo.org/documentation/dev/': None,247 'http://www.sqlalchemy.org/docs/': None,248 'http://wtforms.simplecodes.com/docs/0.5/': None249}Merge branch 'master' into module-supportArmin Ronacherbefore adoption9fa4f94
lines 250–251why, one step back250251pygments_style = 'flask_theme_support.FlaskyStyle'