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