github.com/mckael/restic@v0.8.3/doc/conf.py (about)

     1  #!/usr/bin/env python3
     2  # -*- coding: utf-8 -*-
     3  #
     4  # restic documentation build configuration file, created by
     5  # sphinx-quickstart on Fri Apr 14 22:44:43 2017.
     6  #
     7  # This file is execfile()d with the current directory set to its
     8  # containing dir.
     9  #
    10  # Note that not all possible configuration values are present in this
    11  # autogenerated file.
    12  #
    13  # All configuration values have a default; values that are commented out
    14  # serve to show the default.
    15  import os
    16  
    17  # -- General configuration ------------------------------------------------
    18  
    19  # Add any Sphinx extension module names here, as strings. They can be
    20  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
    21  # ones.
    22  extensions = ['sphinx.ext.extlinks']
    23  
    24  # Add any paths that contain templates here, relative to this directory.
    25  templates_path = ['_templates']
    26  
    27  # The suffix(es) of source filenames.
    28  # You can specify multiple suffix as a list of string:
    29  #
    30  # source_suffix = ['.rst', '.md']
    31  source_suffix = '.rst'
    32  
    33  # The master toctree document.
    34  master_doc = 'index'
    35  
    36  # General information about the project.
    37  project = 'restic'
    38  copyright = '2017, restic authors'
    39  author = 'fd0'
    40  
    41  # The version info for the project you're documenting, acts as replacement for
    42  # |version| and |release|, also used in various other places throughout the
    43  # built documents.
    44  #
    45  # The short X.Y version.
    46  
    47  # read version from ../VERSION
    48  version = open('../VERSION').readlines()[0]
    49  # The full version, including alpha/beta/rc tags.
    50  release = version
    51  
    52  # The language for content autogenerated by Sphinx. Refer to documentation
    53  # for a list of supported languages.
    54  #
    55  # This is also used if you do content translation via gettext catalogs.
    56  # Usually you set "language" from the command line for these cases.
    57  language = None
    58  
    59  # List of patterns, relative to source directory, that match files and
    60  # directories to ignore when looking for source files.
    61  # This patterns also effect to html_static_path and html_extra_path
    62  exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
    63  
    64  # The name of the Pygments (syntax highlighting) style to use.
    65  pygments_style = 'sphinx'
    66  
    67  # If true, `todo` and `todoList` produce output, else they produce nothing.
    68  todo_include_todos = False
    69  
    70  
    71  # -- Options for HTML output ----------------------------------------------
    72  
    73  # The theme to use for HTML and HTML Help pages.  See the documentation for
    74  # a list of builtin themes.
    75  #
    76  if os.environ.get('READTHEDOCS') == 'True':
    77      html_context = {
    78          'css_files': [
    79              'https://media.readthedocs.org/css/sphinx_rtd_theme.css',
    80              'https://media.readthedocs.org/css/readthedocs-doc-embed.css',
    81              '_static/css/restic.css',
    82          ]
    83      }
    84  else:
    85      # we're not built by rtd => add rtd-theme
    86      import sphinx_rtd_theme
    87      html_theme = 'sphinx_rtd_theme'
    88      html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
    89      html_style = 'css/restic.css'
    90  
    91  html_logo = 'logo/logo.png'
    92  
    93  html_favicon = '_static/favicon.ico'
    94  
    95  html_show_version = False
    96  
    97  # Add any paths that contain custom static files (such as style sheets) here,
    98  # relative to this directory. They are copied after the builtin static files,
    99  # so a file named "default.css" will overwrite the builtin "default.css".
   100  html_static_path = ['_static']
   101  
   102  
   103  # -- Options for HTMLHelp output ------------------------------------------
   104  
   105  # Output file base name for HTML help builder.
   106  htmlhelp_basename = 'resticdoc'
   107  
   108  extlinks = {
   109      'issue': ('https://github.com/restic/restic/issues/%s', '#'),
   110  }