github.com/hashicorp/hcl/v2@v2.20.0/guide/conf.py (about)

     1  import subprocess
     2  import os
     3  import os.path
     4  
     5  # -- Project information -----------------------------------------------------
     6  
     7  project = u'HCL'
     8  copyright = u'2018, HashiCorp'
     9  author = u'HashiCorp'
    10  
    11  if 'READTHEDOCS_VERSION' in os.environ:
    12      version_str = os.environ['READTHEDOCS_VERSION']
    13  else:
    14      version_str = subprocess.check_output(['git', 'describe', '--always']).strip()
    15  
    16  # The short X.Y version
    17  version = unicode(version_str)
    18  # The full version, including alpha/beta/rc tags
    19  release = unicode(version_str)
    20  
    21  
    22  # -- General configuration ---------------------------------------------------
    23  
    24  # If your documentation needs a minimal Sphinx version, state it here.
    25  #
    26  # needs_sphinx = '1.0'
    27  
    28  # Add any Sphinx extension module names here, as strings. They can be
    29  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
    30  # ones.
    31  extensions = [
    32      'sphinx.ext.todo',
    33      'sphinx.ext.githubpages',
    34      'sphinxcontrib.golangdomain',
    35      'sphinx.ext.autodoc',
    36  ]
    37  
    38  # Add any paths that contain templates here, relative to this directory.
    39  templates_path = ['_templates']
    40  
    41  # The suffix(es) of source filenames.
    42  # You can specify multiple suffix as a list of string:
    43  #
    44  # source_suffix = ['.rst', '.md']
    45  source_suffix = '.rst'
    46  
    47  # The master toctree document.
    48  master_doc = 'index'
    49  
    50  # The language for content autogenerated by Sphinx. Refer to documentation
    51  # for a list of supported languages.
    52  #
    53  # This is also used if you do content translation via gettext catalogs.
    54  # Usually you set "language" from the command line for these cases.
    55  language = None
    56  
    57  # List of patterns, relative to source directory, that match files and
    58  # directories to ignore when looking for source files.
    59  # This pattern also affects html_static_path and html_extra_path .
    60  exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', 'env']
    61  
    62  # The name of the Pygments (syntax highlighting) style to use.
    63  pygments_style = 'sphinx'
    64  
    65  
    66  # -- Options for HTML output -------------------------------------------------
    67  
    68  # The theme to use for HTML and HTML Help pages.  See the documentation for
    69  # a list of builtin themes.
    70  #
    71  html_theme = 'alabaster'
    72  
    73  # Theme options are theme-specific and customize the look and feel of a theme
    74  # further.  For a list of options available for each theme, see the
    75  # documentation.
    76  #
    77  # html_theme_options = {}
    78  
    79  # Add any paths that contain custom static files (such as style sheets) here,
    80  # relative to this directory. They are copied after the builtin static files,
    81  # so a file named "default.css" will overwrite the builtin "default.css".
    82  html_static_path = ['_static']
    83  
    84  # Custom sidebar templates, must be a dictionary that maps document names
    85  # to template names.
    86  #
    87  # The default sidebars (for documents that don't match any pattern) are
    88  # defined by theme itself.  Builtin themes are using these templates by
    89  # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
    90  # 'searchbox.html']``.
    91  #
    92  # html_sidebars = {}
    93  
    94  
    95  # -- Options for HTMLHelp output ---------------------------------------------
    96  
    97  # Output file base name for HTML help builder.
    98  htmlhelp_basename = 'HCLdoc'
    99  
   100  
   101  # -- Options for LaTeX output ------------------------------------------------
   102  
   103  latex_elements = {
   104      # The paper size ('letterpaper' or 'a4paper').
   105      #
   106      # 'papersize': 'letterpaper',
   107  
   108      # The font size ('10pt', '11pt' or '12pt').
   109      #
   110      # 'pointsize': '10pt',
   111  
   112      # Additional stuff for the LaTeX preamble.
   113      #
   114      # 'preamble': '',
   115  
   116      # Latex figure (float) alignment
   117      #
   118      # 'figure_align': 'htbp',
   119  }
   120  
   121  # Grouping the document tree into LaTeX files. List of tuples
   122  # (source start file, target name, title,
   123  #  author, documentclass [howto, manual, or own class]).
   124  latex_documents = [
   125      (master_doc, 'HCL.tex', u'HCL Documentation',
   126       u'HashiCorp', 'manual'),
   127  ]
   128  
   129  
   130  # -- Options for manual page output ------------------------------------------
   131  
   132  # One entry per manual page. List of tuples
   133  # (source start file, name, description, authors, manual section).
   134  man_pages = [
   135      (master_doc, 'hcl', u'HCL Documentation',
   136       [author], 1)
   137  ]
   138  
   139  
   140  # -- Options for Texinfo output ----------------------------------------------
   141  
   142  # Grouping the document tree into Texinfo files. List of tuples
   143  # (source start file, target name, title, author,
   144  #  dir menu entry, description, category)
   145  texinfo_documents = [
   146      (master_doc, 'HCL', u'HCL Documentation',
   147       author, 'HCL', 'One line description of project.',
   148       'Miscellaneous'),
   149  ]
   150  
   151  
   152  # -- Extension configuration -------------------------------------------------
   153  
   154  # -- Options for todo extension ----------------------------------------------
   155  
   156  # If true, `todo` and `todoList` produce output, else they produce nothing.
   157  todo_include_todos = True