# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
-#sys.path.append(os.path.abspath('some/directory'))
+sys.path.append(os.path.dirname(os.path.abspath(__file__)))
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-#extensions = []
+extensions = ['sphinx.ext.autodoc', 'jinjaext']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# other places throughout the built documents.
#
# The short X.Y version.
-version = '2.0'
-# The full version, including alpha/beta/rc tags.
-release = '2.0'
+import pkg_resources
+try:
+ release = pkg_resources.get_distribution('Jinja2').version
+except ImportError:
+ print 'To build the documentation, The distribution information of Jinja2'
+ print 'Has to be available. Either install the package into your'
+ print 'development environment or run "setup.py develop" to setup the'
+ print 'metadata. A virtualenv is recommended!'
+ sys.exit(1)
+if 'dev' in release:
+ release = release.split('dev')[0] + 'dev'
+version = '.'.join(release.split('.')[:2])
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'jinjaext.JinjaStyle'
# Options for HTML output
# -----------------------
-# The style sheet to use for HTML and HTML Help pages. A file of that name
-# must exist either in Sphinx' static/ path, or in one of the custom paths
-# given in html_static_path.
-html_style = 'default.css'
+html_theme = 'jinja'
+html_theme_path = ['_themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# typographically correct entities.
#html_use_smartypants = True
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_use_modindex = True
+# no modindex
+html_use_modindex = False
# If true, the reST sources are included in the HTML build as _sources/<name>.
#html_copy_source = True
# ------------------------
# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
+latex_paper_size = 'a4'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('index', 'Jinja2.tex', 'Jinja2 Documentation', 'Armin Ronacher', 'manual'),
+ ('latexindex', 'Jinja2.tex', 'Jinja2 Documentation', 'Armin Ronacher',
+ 'manual'),
]
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
+# Additional stuff for LaTeX
+latex_elements = {
+ 'fontpkg': r'\usepackage{mathpazo}',
+ 'papersize': 'a4paper',
+ 'pointsize': '12pt',
+ 'preamble': r'''
+\usepackage{jinjastyle}
+
+% i hate you latex
+\DeclareUnicodeCharacter{14D}{o}
+'''
+}
+
+latex_use_parts = True
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
+latex_additional_files = ['jinjastyle.sty', 'logo.pdf']
# If false, no module index is generated.
-#latex_use_modindex = True
+latex_use_modindex = False
+
+html_sidebars = {
+ 'index': ['sidebarlogo.html', 'sidebarintro.html', 'sourcelink.html',
+ 'searchbox.html'],
+ '**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',
+ 'sourcelink.html', 'searchbox.html']
+}