github.com/kaituanwang/hyperledger@v2.0.1+incompatible/docs/source/conf.py (about) 1 # -*- coding: utf-8 -*- 2 # 3 # SPDX-License-Identifier: Apache-2.0 4 # 5 # hyperledger-fabricdocs documentation build configuration file, created by 6 # sphinx-quickstart on Mon Feb 20 16:11:53 2017. 7 # 8 # This file is execfile()d with the current directory set to its 9 # containing dir. 10 # 11 # Note that not all possible configuration values are present in this 12 # autogenerated file. 13 # 14 # All configuration values have a default; values that are commented out 15 # serve to show the default. 16 17 # If extensions (or modules to document with autodoc) are in another directory, 18 # add these directories to sys.path here. If the directory is relative to the 19 # documentation root, use os.path.abspath to make it absolute, like shown here. 20 # 21 import os 22 import sys 23 24 sys.path.insert(0, os.path.abspath('.')) 25 26 import sphinx_rtd_theme 27 28 placeholder_replacements = { 29 "{BRANCH}": "release-2.0" 30 } 31 32 # -- General configuration ------------------------------------------------ 33 34 # If your documentation needs a minimal Sphinx version, state it here. 35 # 36 # needs_sphinx = '1.0' 37 38 # Add any Sphinx extension module names here, as strings. They can be 39 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 40 # ones. 41 extensions = ['sphinx.ext.autodoc', 42 'sphinx.ext.doctest', 43 'sphinx.ext.intersphinx', 44 'sphinx.ext.todo', 45 'sphinx.ext.imgmath', 46 'sphinx.ext.ifconfig', 47 'sphinx.ext.viewcode'] 48 49 # Add any paths that contain templates here, relative to this directory. 50 templates_path = ['_templates'] 51 52 # recommonmark is a python utility that allows markdown to be used within 53 # Sphinx projects. 54 # Installed version as per directive in docs/requirement.txt 55 from recommonmark.parser import CommonMarkParser 56 57 source_parsers = { 58 '.md': CommonMarkParser, 59 } 60 61 # The suffix(es) of source filenames. 62 # You can specify multiple suffix as a list of string: 63 # 64 # source_suffix = ['.rst', '.md'] 65 source_suffix = ['.rst', '.md'] 66 67 # The master toctree document. 68 master_doc = 'index' 69 70 # General information about the project. 71 project = u'hyperledger-fabricdocs' 72 copyright = u'2017, hyperledger' 73 author = u'hyperledger' 74 75 # The version info for the project you're documenting, acts as replacement for 76 # |version| and |release|, also used in various other places throughout the 77 # built documents. 78 # 79 # The short X.Y version. 80 version = u'master' 81 # The full version, including alpha/beta/rc tags. 82 release = u'master' 83 84 # The language for content autogenerated by Sphinx. Refer to documentation 85 # for a list of supported languages. 86 # 87 # This is also used if you do content translation via gettext catalogs. 88 # Usually you set "language" from the command line for these cases. 89 language = None 90 91 # List of patterns, relative to source directory, that match files and 92 # directories to ignore when looking for source files. 93 # This patterns also effect to html_static_path and html_extra_path 94 exclude_patterns = [] 95 96 # The name of the Pygments (syntax highlighting) style to use. 97 pygments_style = 'sphinx' 98 99 # If true, `todo` and `todoList` produce output, else they produce nothing. 100 todo_include_todos = True 101 102 # -- Options for HTML output ---------------------------------------------- 103 104 # The theme to use for HTML and HTML Help pages. See the documentation for 105 # a list of builtin themes. 106 # 107 html_theme = 'sphinx_rtd_theme' 108 109 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 110 111 # Theme options are theme-specific and customize the look and feel of a theme 112 # further. For a list of options available for each theme, see the 113 # documentation. 114 # 115 # html_theme_options = {} 116 117 # Add any paths that contain custom static files (such as style sheets) here, 118 # relative to this directory. They are copied after the builtin static files, 119 # so a file named "default.css" will overwrite the builtin "default.css". 120 html_static_path = ['_static'] 121 122 def placeholderReplace(app, docname, source): 123 result = source[0] 124 for key in app.config.placeholder_replacements: 125 result = result.replace(key, app.config.placeholder_replacements[key]) 126 source[0] = result 127 128 def setup(app): 129 app.add_stylesheet('css/custom.css') 130 app.add_config_value('placeholder_replacements', {}, True) 131 app.connect('source-read', placeholderReplace) 132 133 # -- Options for HTMLHelp output ------------------------------------------ 134 135 # Output file base name for HTML help builder. 136 htmlhelp_basename = 'hyperledger-fabricdocsdoc' 137 138 # -- Options for LaTeX output --------------------------------------------- 139 140 latex_elements = { 141 # The paper size ('letterpaper' or 'a4paper'). 142 # 143 # 'papersize': 'letterpaper', 144 145 # The font size ('10pt', '11pt' or '12pt'). 146 # 147 # 'pointsize': '10pt', 148 149 # Additional stuff for the LaTeX preamble. 150 # 151 # 'preamble': '', 152 153 # Latex figure (float) alignment 154 # 155 # 'figure_align': 'htbp', 156 } 157 158 # Grouping the document tree into LaTeX files. List of tuples 159 # (source start file, target name, title, 160 # author, documentclass [howto, manual, or own class]). 161 latex_documents = [ 162 (master_doc, 'hyperledger-fabricdocs.tex', 163 u'hyperledger-fabricdocs Documentation', 164 u'hyperledger', 'manual'), 165 ] 166 167 # -- Options for manual page output --------------------------------------- 168 169 # One entry per manual page. List of tuples 170 # (source start file, name, description, authors, manual section). 171 man_pages = [ 172 (master_doc, 'hyperledger-fabricdocs', 173 u'hyperledger-fabricdocs Documentation', 174 [author], 1) 175 ] 176 177 # -- Options for Texinfo output ------------------------------------------- 178 179 # Grouping the document tree into Texinfo files. List of tuples 180 # (source start file, target name, title, author, 181 # dir menu entry, description, category) 182 texinfo_documents = [ 183 (master_doc, 'hyperledger-fabricdocs', 184 u'hyperledger-fabricdocs Documentation', 185 author, 'hyperledger-fabricdocs', 'One line description of project.', 186 'Miscellaneous'), 187 ] 188 189 # -- Options for Epub output ---------------------------------------------- 190 191 # Bibliographic Dublin Core info. 192 epub_title = project 193 epub_author = author 194 epub_publisher = author 195 epub_copyright = copyright 196 197 # The unique identifier of the text. This can be a ISBN number 198 # or the project homepage. 199 # 200 # epub_identifier = '' 201 202 # A unique identification for the text. 203 # 204 # epub_uid = '' 205 206 # A list of files that should not be packed into the epub file. 207 epub_exclude_files = ['search.html'] 208 209 # Example configuration for intersphinx: refer to the Python standard library. 210 intersphinx_mapping = {'https://docs.python.org/': None} 211 212 # Skip the links with anchor tags during the linkcheck 213 linkcheck_anchors = False 214 215 # Increase the linkcheck timeout to 5 seconds 216 linkcheck_timeout = 5