Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | import sys |
| 4 | import os |
| 5 | |
| 6 | # If extensions (or modules to document with autodoc) are in another directory, |
| 7 | # add these directories to sys.path here. If the directory is relative to the |
| 8 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 9 | #sys.path.insert(0, os.path.abspath('.')) |
| 10 | |
| 11 | # -- General configuration ------------------------------------------------ |
| 12 | |
| 13 | # If your documentation needs a minimal Sphinx version, state it here. |
| 14 | #needs_sphinx = '1.0' |
| 15 | |
| 16 | # Add any Sphinx extension module names here, as strings. They can be |
| 17 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 18 | # ones. |
| 19 | extensions = [ |
| 20 | 'sphinx.ext.todo', |
| 21 | ] |
| 22 | |
| 23 | def addExtensionIfExists(extension): |
| 24 | try: |
| 25 | __import__(extension) |
| 26 | extensions.append(extension) |
| 27 | except ImportError: |
| 28 | sys.stderr.write("Extension '%s' in not available. " |
| 29 | "Some documentation may not build correctly.\n" % extension) |
| 30 | sys.stderr.write("To install, use \n" |
| 31 | " sudo pip install %s\n" % extension.replace('.', '-')) |
| 32 | |
| 33 | addExtensionIfExists('sphinxcontrib.doxylink') |
| 34 | |
| 35 | if os.getenv('GOOGLE_ANALYTICS', None): |
| 36 | addExtensionIfExists('sphinxcontrib.googleanalytics') |
| 37 | |
| 38 | # Add any paths that contain templates here, relative to this directory. |
| 39 | templates_path = ['_templates'] |
| 40 | |
| 41 | # The suffix of source filenames. |
| 42 | source_suffix = '.rst' |
| 43 | |
| 44 | # The encoding of source files. |
| 45 | #source_encoding = 'utf-8-sig' |
| 46 | |
| 47 | # The master toctree document. |
| 48 | master_doc = 'index' |
| 49 | |
| 50 | # General information about the project. |
| 51 | project = u'NDNS: Domain Name Service for Named Data Networking' |
| 52 | copyright = u'2014, Named Data Networking Project' |
| 53 | |
| 54 | # The version info for the project you're documenting, acts as replacement for |
| 55 | # |version| and |release|, also used in various other places throughout the |
| 56 | # built documents. |
| 57 | |
| 58 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 59 | # for a list of supported languages. |
| 60 | #language = None |
| 61 | |
| 62 | # There are two options for replacing |today|: either, you set today to some |
| 63 | # non-false value, then it is used: |
| 64 | #today = '' |
| 65 | # Else, today_fmt is used as the format for a strftime call. |
| 66 | #today_fmt = '%B %d, %Y' |
| 67 | |
| 68 | # List of patterns, relative to source directory, that match files and |
| 69 | # directories to ignore when looking for source files. |
| 70 | exclude_patterns = [] |
| 71 | |
| 72 | # The reST default role (used for this markup: `text`) to use for all |
| 73 | # documents. |
| 74 | #default_role = None |
| 75 | |
| 76 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 77 | #add_function_parentheses = True |
| 78 | |
| 79 | # If true, the current module name will be prepended to all description |
| 80 | # unit titles (such as .. function::). |
| 81 | #add_module_names = True |
| 82 | |
| 83 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 84 | # output. They are ignored by default. |
| 85 | #show_authors = False |
| 86 | |
| 87 | # The name of the Pygments (syntax highlighting) style to use. |
| 88 | pygments_style = 'sphinx' |
| 89 | |
| 90 | # A list of ignored prefixes for module index sorting. |
| 91 | #modindex_common_prefix = [] |
| 92 | |
| 93 | # If true, keep warnings as "system message" paragraphs in the built documents. |
| 94 | #keep_warnings = False |
| 95 | |
| 96 | |
| 97 | # -- Options for HTML output ---------------------------------------------- |
| 98 | |
| 99 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 100 | # a list of builtin themes. |
| 101 | # html_theme = 'default' |
| 102 | html_theme = 'named_data_theme' |
| 103 | |
| 104 | # Theme options are theme-specific and customize the look and feel of a theme |
| 105 | # further. For a list of options available for each theme, see the |
| 106 | # documentation. |
| 107 | #html_theme_options = {} |
| 108 | |
| 109 | # Add any paths that contain custom themes here, relative to this directory. |
| 110 | html_theme_path = ['./'] |
| 111 | |
| 112 | # The name for this set of Sphinx documents. If None, it defaults to |
| 113 | # "<project> v<release> documentation". |
| 114 | #html_title = None |
| 115 | |
| 116 | # A shorter title for the navigation bar. Default is the same as html_title. |
| 117 | #html_short_title = None |
| 118 | |
| 119 | # The name of an image file (relative to this directory) to place at the top |
| 120 | # of the sidebar. |
| 121 | #html_logo = None |
| 122 | |
| 123 | # The name of an image file (within the static path) to use as favicon of the |
| 124 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 125 | # pixels large. |
| 126 | #html_favicon = None |
| 127 | |
| 128 | # 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". |
| 131 | html_static_path = ['_static'] |
| 132 | |
| 133 | # Add any extra paths that contain custom files (such as robots.txt or |
| 134 | # .htaccess) here, relative to this directory. These files are copied |
| 135 | # directly to the root of the documentation. |
| 136 | #html_extra_path = [] |
| 137 | |
| 138 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 139 | # using the given strftime format. |
| 140 | #html_last_updated_fmt = '%b %d, %Y' |
| 141 | |
| 142 | # If true, SmartyPants will be used to convert quotes and dashes to |
| 143 | # typographically correct entities. |
| 144 | #html_use_smartypants = True |
| 145 | |
| 146 | # Custom sidebar templates, maps document names to template names. |
| 147 | #html_sidebars = {} |
| 148 | |
| 149 | # Additional templates that should be rendered to pages, maps page names to |
| 150 | # template names. |
| 151 | #html_additional_pages = {} |
| 152 | |
| 153 | # If false, no module index is generated. |
| 154 | #html_domain_indices = True |
| 155 | |
| 156 | # If false, no index is generated. |
| 157 | #html_use_index = True |
| 158 | |
| 159 | # If true, the index is split into individual pages for each letter. |
| 160 | #html_split_index = False |
| 161 | |
| 162 | # If true, links to the reST sources are added to the pages. |
| 163 | #html_show_sourcelink = True |
| 164 | |
| 165 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
| 166 | #html_show_sphinx = True |
| 167 | |
| 168 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
| 169 | #html_show_copyright = True |
| 170 | |
| 171 | # If true, an OpenSearch description file will be output, and all pages will |
| 172 | # contain a <link> tag referring to it. The value of this option must be the |
| 173 | # base URL from which the finished HTML is served. |
| 174 | #html_use_opensearch = '' |
| 175 | |
| 176 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
| 177 | html_file_suffix = ".html" |
| 178 | |
| 179 | # Output file base name for HTML help builder. |
| 180 | htmlhelp_basename = 'ndns-docs' |
| 181 | |
| 182 | |
| 183 | # -- Options for LaTeX output --------------------------------------------- |
| 184 | |
| 185 | latex_elements = { |
| 186 | # The paper size ('letterpaper' or 'a4paper'). |
| 187 | #'papersize': 'letterpaper', |
| 188 | |
| 189 | # The font size ('10pt', '11pt' or '12pt'). |
| 190 | #'pointsize': '10pt', |
| 191 | |
| 192 | # Additional stuff for the LaTeX preamble. |
| 193 | #'preamble': '', |
| 194 | } |
| 195 | |
| 196 | # Grouping the document tree into LaTeX files. List of tuples |
| 197 | # (source start file, target name, title, |
| 198 | # author, documentclass [howto, manual, or own class]). |
| 199 | latex_documents = [ |
| 200 | ('index', 'ndns-docs.tex', u'NDNS: Domain Name Service for Named Data Networking', |
| 201 | u'Named Data Networking Project', 'manual'), |
| 202 | ] |
| 203 | |
| 204 | # The name of an image file (relative to this directory) to place at the top of |
| 205 | # the title page. |
| 206 | #latex_logo = None |
| 207 | |
| 208 | # For "manual" documents, if this is true, then toplevel headings are parts, |
| 209 | # not chapters. |
| 210 | #latex_use_parts = False |
| 211 | |
| 212 | # If true, show page references after internal links. |
| 213 | #latex_show_pagerefs = False |
| 214 | |
| 215 | # If true, show URL addresses after external links. |
| 216 | #latex_show_urls = False |
| 217 | |
| 218 | # Documents to append as an appendix to all manuals. |
| 219 | #latex_appendices = [] |
| 220 | |
| 221 | # If false, no module index is generated. |
| 222 | #latex_domain_indices = True |
| 223 | |
| 224 | |
| 225 | # -- Options for manual page output --------------------------------------- |
| 226 | |
| 227 | # One entry per manual page. List of tuples |
| 228 | # (source start file, name, description, authors, manual section). |
| 229 | man_pages = [ |
| 230 | ('manpages/ndns-daemon', 'ndns-daemon', u'Domain Name Service Daemon for Named Data Networking', None, 1), |
| 231 | ] |
| 232 | |
| 233 | |
| 234 | # If true, show URL addresses after external links. |
| 235 | #man_show_urls = False |
| 236 | |
| 237 | doxylink = { |
| 238 | 'NDNS' : ('NDNS.tag', 'doxygen/'), |
| 239 | } |
| 240 | |
| 241 | if os.getenv('GOOGLE_ANALYTICS', None): |
| 242 | googleanalytics_id = os.environ['GOOGLE_ANALYTICS'] |
| 243 | googleanalytics_enabled = True |