github.com/lbryio/lbcd@v0.22.119/docs/conf.py (about)

     1  # Configuration file for the Sphinx documentation builder.
     2  #
     3  # This file only contains a selection of the most common options. For a full
     4  # list see the documentation:
     5  # https://www.sphinx-doc.org/en/master/usage/configuration.html
     6  
     7  # -- Path setup --------------------------------------------------------------
     8  
     9  # If extensions (or modules to document with autodoc) are in another directory,
    10  # add these directories to sys.path here. If the directory is relative to the
    11  # documentation root, use os.path.abspath to make it absolute, like shown here.
    12  #
    13  # import os
    14  # import sys
    15  # sys.path.insert(0, os.path.abspath('.'))
    16  import recommonmark
    17  from recommonmark.transform import AutoStructify
    18  
    19  # -- Project information -----------------------------------------------------
    20  
    21  project = 'lbcd'
    22  copyright = '2021, lbcd'
    23  author = 'LBRY developers'
    24  
    25  # The full version, including alpha/beta/rc tags
    26  release = 'beta'
    27  
    28  source_suffix = ['.md']
    29  
    30  # The master toctree document.
    31  master_doc = 'index'
    32  
    33  # -- General configuration ---------------------------------------------------
    34  
    35  # Add any Sphinx extension module names here, as strings. They can be
    36  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
    37  # ones.
    38  extensions = [
    39      'sphinx.ext.autodoc',
    40      'sphinx.ext.napoleon',
    41      'sphinx.ext.mathjax',
    42      'sphinx_markdown_tables',
    43      'recommonmark',
    44  ]
    45  
    46  # Add any paths that contain templates here, relative to this directory.
    47  templates_path = ['_templates']
    48  
    49  # List of patterns, relative to source directory, that match files and
    50  # directories to ignore when looking for source files.
    51  # This pattern also affects html_static_path and html_extra_path.
    52  exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
    53  
    54  
    55  # -- Options for HTML output -------------------------------------------------
    56  
    57  # The theme to use for HTML and HTML Help pages.  See the documentation for
    58  # a list of builtin themes.
    59  #
    60  html_theme = 'sphinx_rtd_theme'
    61  
    62  # Add any paths that contain custom static files (such as style sheets) here,
    63  # relative to this directory. They are copied after the builtin static files,
    64  # so a file named "default.css" will overwrite the builtin "default.css".
    65  html_static_path = ['_static']
    66  
    67  # app setup hook
    68  
    69  
    70  def setup(app):
    71      app.add_config_value('recommonmark_config', {
    72          # 'url_resolver': lambda url: github_doc_root + url,
    73          'auto_toc_tree_section': 'Contents',
    74          'enable_math': False,
    75          'enable_inline_math': False,
    76          'enable_eval_rst': True,
    77          'enable_auto_doc_ref': True,
    78      }, True)
    79      app.add_transform(AutoStructify)