github.com/true-sqn/fabric@v2.1.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 sys.path.insert(0, os.path.abspath('.')) 24 25 26 import sphinx_rtd_theme 27 28 placeholder_replacements = { 29 "{BRANCH}" : "master" 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 103 # -- Options for HTML output ---------------------------------------------- 104 105 # The theme to use for HTML and HTML Help pages. See the documentation for 106 # a list of builtin themes. 107 # 108 html_theme = 'sphinx_rtd_theme' 109 110 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 111 112 # Theme options are theme-specific and customize the look and feel of a theme 113 # further. For a list of options available for each theme, see the 114 # documentation. 115 # 116 # html_theme_options = {} 117 118 # Add any paths that contain custom static files (such as style sheets) here, 119 # relative to this directory. They are copied after the builtin static files, 120 # so a file named "default.css" will overwrite the builtin "default.css". 121 html_static_path = ['_static'] 122 123 def placeholderReplace(app, docname, source): 124 result = source[0] 125 for key in app.config.placeholder_replacements: 126 result = result.replace(key, app.config.placeholder_replacements[key]) 127 source[0] = result 128 129 130 def setup(app): 131 app.add_stylesheet('css/custom.css') 132 app.add_config_value('placeholder_replacements', {}, True) 133 app.connect('source-read', placeholderReplace) 134 135 # -- Options for HTMLHelp output ------------------------------------------ 136 137 # Output file base name for HTML help builder. 138 htmlhelp_basename = 'hyperledger-fabricdocsdoc' 139 140 141 # -- Options for LaTeX output --------------------------------------------- 142 143 latex_elements = { 144 # The paper size ('letterpaper' or 'a4paper'). 145 # 146 # 'papersize': 'letterpaper', 147 148 # The font size ('10pt', '11pt' or '12pt'). 149 # 150 # 'pointsize': '10pt', 151 152 # Additional stuff for the LaTeX preamble. 153 # 154 # 'preamble': '', 155 156 # Latex figure (float) alignment 157 # 158 # 'figure_align': 'htbp', 159 } 160 161 # Grouping the document tree into LaTeX files. List of tuples 162 # (source start file, target name, title, 163 # author, documentclass [howto, manual, or own class]). 164 latex_documents = [ 165 (master_doc, 'hyperledger-fabricdocs.tex', u'hyperledger-fabricdocs Documentation', 166 u'hyperledger', 'manual'), 167 ] 168 169 170 # -- Options for manual page output --------------------------------------- 171 172 # One entry per manual page. List of tuples 173 # (source start file, name, description, authors, manual section). 174 man_pages = [ 175 (master_doc, 'hyperledger-fabricdocs', u'hyperledger-fabricdocs Documentation', 176 [author], 1) 177 ] 178 179 180 # -- Options for Texinfo output ------------------------------------------- 181 182 # Grouping the document tree into Texinfo files. List of tuples 183 # (source start file, target name, title, author, 184 # dir menu entry, description, category) 185 texinfo_documents = [ 186 (master_doc, 'hyperledger-fabricdocs', u'hyperledger-fabricdocs Documentation', 187 author, 'hyperledger-fabricdocs', 'One line description of project.', 188 'Miscellaneous'), 189 ] 190 191 192 193 # -- Options for Epub output ---------------------------------------------- 194 195 # Bibliographic Dublin Core info. 196 epub_title = project 197 epub_author = author 198 epub_publisher = author 199 epub_copyright = copyright 200 201 # The unique identifier of the text. This can be a ISBN number 202 # or the project homepage. 203 # 204 # epub_identifier = '' 205 206 # A unique identification for the text. 207 # 208 # epub_uid = '' 209 210 # A list of files that should not be packed into the epub file. 211 epub_exclude_files = ['search.html'] 212 213 # Example configuration for intersphinx: refer to the Python standard library. 214 intersphinx_mapping = {'https://docs.python.org/': None} 215 216 # Skip the links with anchor tags during the linkcheck 217 linkcheck_anchors = False 218 219 # Increase the linkcheck timeout to 5 seconds 220 linkcheck_timeout = 5