2020-09-18 12:57:32 +02:00
|
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
|
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
|
|
#
|
|
|
|
# import os
|
|
|
|
# import sys
|
|
|
|
# sys.path.insert(0, os.path.abspath('.'))
|
|
|
|
|
|
|
|
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
|
2022-02-03 13:43:18 +01:00
|
|
|
project = "Haystack"
|
|
|
|
copyright = "2020, deepset"
|
|
|
|
author = "deepset"
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# The full version, including alpha/beta/rc tags
|
|
|
|
|
|
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
|
|
# ones.
|
2022-02-03 13:43:18 +01:00
|
|
|
extensions = [
|
|
|
|
"sphinx.ext.autodoc",
|
|
|
|
"IPython.sphinxext.ipython_console_highlighting",
|
|
|
|
"sphinx_rtd_theme",
|
|
|
|
"sphinx_tabs.tabs",
|
|
|
|
"sphinx_copybutton",
|
|
|
|
"nbsphinx",
|
|
|
|
"sphinx.ext.autosectionlabel",
|
|
|
|
"sphinx_markdown_builder",
|
|
|
|
"recommonmark",
|
|
|
|
]
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
2022-02-03 13:43:18 +01:00
|
|
|
templates_path = ["../templates"]
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
|
|
# directories to ignore when looking for source files.
|
|
|
|
# This pattern also affects html_static_path and html_extra_path.
|
2022-02-03 13:43:18 +01:00
|
|
|
exclude_patterns = ["build/*"]
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
|
|
# a list of builtin themes.
|
|
|
|
#
|
2022-02-03 13:43:18 +01:00
|
|
|
html_theme = "sphinx_rtd_theme"
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# This fixes weird spacing between bullet points in lists
|
|
|
|
html4_writer = True
|
|
|
|
|
|
|
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
|
|
# relative to this directory. They are copied after the builtin static files,
|
|
|
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
2022-02-03 13:43:18 +01:00
|
|
|
html_static_path = ["../static"]
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# -- Added configuration -----------------------------------------------------
|
|
|
|
|
|
|
|
# Define master file which is by default contents.rst
|
|
|
|
master_doc = "index"
|
|
|
|
|
|
|
|
# Logo for the title
|
2022-02-03 13:43:18 +01:00
|
|
|
html_logo = "img/logo.png"
|
|
|
|
|
2020-09-18 12:57:32 +02:00
|
|
|
# Custom css
|
2022-02-03 13:43:18 +01:00
|
|
|
# html_context = {"css_files":["_static/custom.css"]}
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# Additional layouts
|
|
|
|
html_additional_pages = {"index": "pages/index.html"}
|
|
|
|
|
2022-02-03 13:43:18 +01:00
|
|
|
# The file extensions of source files.
|
2022-03-07 19:25:33 +01:00
|
|
|
source_suffix = {".rst": "restructuredtext", ".txt": "restructuredtext", ".md": "markdown"}
|
2020-09-18 12:57:32 +02:00
|
|
|
|
|
|
|
# -- Add autodocs for __init__() methods -------------------------------------
|
|
|
|
|
2022-02-03 13:43:18 +01:00
|
|
|
|
2020-09-18 12:57:32 +02:00
|
|
|
def skip(app, what, name, obj, would_skip, options):
|
|
|
|
if name == "__init__":
|
|
|
|
return False
|
|
|
|
return would_skip
|
|
|
|
|
|
|
|
|
|
|
|
def setup(app):
|
2022-02-03 13:43:18 +01:00
|
|
|
# Custom css
|
|
|
|
app.add_stylesheet("rtd_theme.css")
|
|
|
|
app.connect("autodoc-skip-member", skip)
|