Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # |
| 3 | # Jinja2 documentation build configuration file, created by |
| 4 | # 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 namespace |
| 9 | # 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 out |
| 12 | # serve to show the default value. |
| 13 | |
| 14 | import sys, os |
| 15 | |
| 16 | # If your extensions are in another directory, add it here. If the directory |
| 17 | # is relative to the documentation root, use os.path.abspath to make it |
| 18 | # absolute, like shown here. |
Armin Ronacher | 3c8b7ad | 2008-04-28 13:52:21 +0200 | [diff] [blame] | 19 | sys.path.append(os.path.dirname(os.path.abspath(__file__))) |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 20 | |
| 21 | # General configuration |
| 22 | # --------------------- |
| 23 | |
| 24 | # Add any Sphinx extension module names here, as strings. They can be extensions |
| 25 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
Armin Ronacher | 3c8b7ad | 2008-04-28 13:52:21 +0200 | [diff] [blame] | 26 | extensions = ['sphinx.ext.autodoc', 'jinjaext'] |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 27 | |
| 28 | # Add any paths that contain templates here, relative to this directory. |
| 29 | templates_path = ['_templates'] |
| 30 | |
| 31 | # The suffix of source filenames. |
| 32 | source_suffix = '.rst' |
| 33 | |
| 34 | # The master toctree document. |
| 35 | master_doc = 'index' |
| 36 | |
| 37 | # General substitutions. |
| 38 | project = 'Jinja2' |
| 39 | copyright = '2008, Armin Ronacher' |
| 40 | |
| 41 | # The default replacements for |version| and |release|, also used in various |
| 42 | # other places throughout the built documents. |
| 43 | # |
| 44 | # The short X.Y version. |
Armin Ronacher | 4b37694 | 2011-02-06 12:28:29 +0100 | [diff] [blame] | 45 | import pkg_resources |
| 46 | try: |
| 47 | release = pkg_resources.get_distribution('Jinja2').version |
| 48 | except 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) |
| 54 | if 'dev' in release: |
| 55 | release = release.split('dev')[0] + 'dev' |
| 56 | version = '.'.join(release.split('.')[:2]) |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 57 | |
| 58 | # There are two options for replacing |today|: either, you set today to some |
| 59 | # non-false value, then it is used: |
| 60 | #today = '' |
| 61 | # Else, today_fmt is used as the format for a strftime call. |
| 62 | today_fmt = '%B %d, %Y' |
| 63 | |
| 64 | # List of documents that shouldn't be included in the build. |
| 65 | #unused_docs = [] |
| 66 | |
| 67 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 68 | #add_function_parentheses = True |
| 69 | |
| 70 | # If true, the current module name will be prepended to all description |
| 71 | # unit titles (such as .. function::). |
| 72 | #add_module_names = True |
| 73 | |
| 74 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 75 | # output. They are ignored by default. |
| 76 | #show_authors = False |
| 77 | |
| 78 | # The name of the Pygments (syntax highlighting) style to use. |
Armin Ronacher | 157531b | 2008-04-28 16:14:03 +0200 | [diff] [blame] | 79 | pygments_style = 'jinjaext.JinjaStyle' |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 80 | |
| 81 | |
| 82 | # Options for HTML output |
| 83 | # ----------------------- |
| 84 | |
Armin Ronacher | 988a04c | 2011-01-24 02:03:57 +0100 | [diff] [blame] | 85 | html_theme = 'jinja' |
| 86 | html_theme_path = ['_themes'] |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 87 | |
| 88 | # The name for this set of Sphinx documents. If None, it defaults to |
| 89 | # "<project> v<release> documentation". |
| 90 | #html_title = None |
| 91 | |
| 92 | # 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". |
| 95 | html_static_path = ['_static'] |
| 96 | |
| 97 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 98 | # using the given strftime format. |
| 99 | html_last_updated_fmt = '%b %d, %Y' |
| 100 | |
| 101 | # If true, SmartyPants will be used to convert quotes and dashes to |
| 102 | # typographically correct entities. |
| 103 | #html_use_smartypants = True |
| 104 | |
Armin Ronacher | 9d472df | 2008-05-04 19:56:34 +0200 | [diff] [blame] | 105 | # no modindex |
| 106 | html_use_modindex = False |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 107 | |
| 108 | # If true, the reST sources are included in the HTML build as _sources/<name>. |
| 109 | #html_copy_source = True |
| 110 | |
| 111 | # If true, an OpenSearch description file will be output, and all pages will |
| 112 | # contain a <link> tag referring to it. |
| 113 | #html_use_opensearch = False |
| 114 | |
| 115 | # Output file base name for HTML help builder. |
| 116 | htmlhelp_basename = 'Jinja2doc' |
| 117 | |
| 118 | |
| 119 | # Options for LaTeX output |
| 120 | # ------------------------ |
| 121 | |
| 122 | # The paper size ('letter' or 'a4'). |
Armin Ronacher | d134231 | 2008-04-28 12:20:12 +0200 | [diff] [blame] | 123 | latex_paper_size = 'a4' |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 124 | |
| 125 | # The font size ('10pt', '11pt' or '12pt'). |
| 126 | #latex_font_size = '10pt' |
| 127 | |
| 128 | # Grouping the document tree into LaTeX files. List of tuples |
| 129 | # (source start file, target name, title, author, document class [howto/manual]). |
| 130 | latex_documents = [ |
Armin Ronacher | 89f61fd | 2011-02-06 12:19:30 +0100 | [diff] [blame] | 131 | ('latexindex', 'Jinja2.tex', 'Jinja2 Documentation', 'Armin Ronacher', |
| 132 | 'manual'), |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 133 | ] |
| 134 | |
Armin Ronacher | 89f61fd | 2011-02-06 12:19:30 +0100 | [diff] [blame] | 135 | # Additional stuff for LaTeX |
| 136 | latex_elements = { |
| 137 | 'fontpkg': r'\usepackage{mathpazo}', |
| 138 | 'papersize': 'a4paper', |
| 139 | 'pointsize': '12pt', |
| 140 | 'preamble': r''' |
| 141 | \usepackage{jinjastyle} |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 142 | |
Armin Ronacher | 89f61fd | 2011-02-06 12:19:30 +0100 | [diff] [blame] | 143 | % i hate you latex |
| 144 | \DeclareUnicodeCharacter{14D}{o} |
| 145 | ''' |
| 146 | } |
| 147 | |
| 148 | latex_use_parts = True |
| 149 | |
| 150 | latex_additional_files = ['jinjastyle.sty', 'logo.pdf'] |
Armin Ronacher | 083ae16 | 2008-04-27 21:42:57 +0200 | [diff] [blame] | 151 | |
| 152 | # If false, no module index is generated. |
Armin Ronacher | 76c280b | 2008-05-04 12:31:48 +0200 | [diff] [blame] | 153 | latex_use_modindex = False |
Armin Ronacher | 988a04c | 2011-01-24 02:03:57 +0100 | [diff] [blame] | 154 | |
| 155 | html_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 | } |