Skip to content
Myr

conf.py

This file

Path

docs/conf.py

160 lines · 4.9 KiB · Python

Last changed by

Not known.

History of this file

Take it

1# -*- coding: utf-8 -*-2#3# Jinja2 documentation build configuration file, created by4# sphinx-quickstart on Sun Apr 27 21:42:41 2008.5#6# This file is execfile()d with the current directory set to its containing dir.7#8# The contents of this file are pickled, so don't put values in the namespace9# that aren't pickleable (module imports are okay, they're removed automatically).10#11# All configuration values have a default value; values that are commented out12# serve to show the default value.1314import sys, os1516# If your extensions are in another directory, add it here. If the directory17# is relative to the documentation root, use os.path.abspath to make it18# absolute, like shown here.19sys.path.append(os.path.dirname(os.path.abspath(__file__)))2021# General configuration22# ---------------------2324# Add any Sphinx extension module names here, as strings. They can be extensions25# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.26extensions = ['sphinx.ext.autodoc', 'jinjaext']2728# Add any paths that contain templates here, relative to this directory.29templates_path = ['_templates']3031# The suffix of source filenames.32source_suffix = '.rst'3334# The master toctree document.35master_doc = 'index'3637# General substitutions.38project = 'Jinja2'39copyright = '2008, Armin Ronacher'4041# The default replacements for |version| and |release|, also used in various42# other places throughout the built documents.43#44# The short X.Y version.45import pkg_resources46try:47    release = pkg_resources.get_distribution('Jinja2').version48except ImportError:49    print 'To build the documentation, The distribution information of Jinja2'50    print 'Has to be available.  Either install the package into your'51    print 'development environment or run "setup.py develop" to setup the'52    print 'metadata.  A virtualenv is recommended!'53    sys.exit(1)54if 'dev' in release:55    release = release.split('dev')[0] + 'dev'56version = '.'.join(release.split('.')[:2])5758# There are two options for replacing |today|: either, you set today to some59# non-false value, then it is used:60#today = ''61# Else, today_fmt is used as the format for a strftime call.62today_fmt = '%B %d, %Y'6364# List of documents that shouldn't be included in the build.65#unused_docs = []6667# If true, '()' will be appended to :func: etc. cross-reference text.68#add_function_parentheses = True6970# If true, the current module name will be prepended to all description71# unit titles (such as .. function::).72#add_module_names = True7374# If true, sectionauthor and moduleauthor directives will be shown in the75# output. They are ignored by default.76#show_authors = False7778# The name of the Pygments (syntax highlighting) style to use.79pygments_style = 'jinjaext.JinjaStyle'808182# Options for HTML output83# -----------------------8485html_theme = 'jinja'86html_theme_path = ['_themes']8788# The name for this set of Sphinx documents.  If None, it defaults to89# "<project> v<release> documentation".90#html_title = None9192# Add any paths that contain custom static files (such as style sheets) here,93# relative to this directory. They are copied after the builtin static files,94# so a file named "default.css" will overwrite the builtin "default.css".95html_static_path = ['_static']9697# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,98# using the given strftime format.99html_last_updated_fmt = '%b %d, %Y'100101# If true, SmartyPants will be used to convert quotes and dashes to102# typographically correct entities.103#html_use_smartypants = True104105# no modindex106html_use_modindex = False107108# If true, the reST sources are included in the HTML build as _sources/<name>.109#html_copy_source = True110111# If true, an OpenSearch description file will be output, and all pages will112# contain a <link> tag referring to it.113#html_use_opensearch = False114115# Output file base name for HTML help builder.116htmlhelp_basename = 'Jinja2doc'117118119# Options for LaTeX output120# ------------------------121122# The paper size ('letter' or 'a4').123latex_paper_size = 'a4'124125# The font size ('10pt', '11pt' or '12pt').126#latex_font_size = '10pt'127128# Grouping the document tree into LaTeX files. List of tuples129# (source start file, target name, title, author, document class [howto/manual]).130latex_documents = [131  ('latexindex', 'Jinja2.tex', 'Jinja2 Documentation', 'Armin Ronacher',132   'manual'),133]134135# Additional stuff for LaTeX136latex_elements = {137    'fontpkg':      r'\usepackage{mathpazo}',138    'papersize':    'a4paper',139    'pointsize':    '12pt',140    'preamble':     r'''141\usepackage{jinjastyle}142143% i hate you latex144\DeclareUnicodeCharacter{14D}{o}145'''146}147148latex_use_parts = True149150latex_additional_files = ['jinjastyle.sty', 'logo.pdf']151152# If false, no module index is generated.153latex_use_modindex = False154155html_sidebars = {156    'index':    ['sidebarlogo.html', 'sidebarintro.html', 'sourcelink.html',157                 'searchbox.html'],158    '**':       ['sidebarlogo.html', 'localtoc.html', 'relations.html',159                 'sourcelink.html', 'searchbox.html']160}