Simple app to add configuration options to a Django project.
1import os
2from pathlib import Path
3
4from single_source import get_version
5
6# Configuration file for the Sphinx documentation builder.
7#
8# This file only contains a selection of the most common options. For a full
9# list see the documentation:
10# https://www.sphinx-doc.org/en/master/usage/configuration.html
11
12
13# -- Path setup --------------------------------------------------------------
14
15# If extensions (or modules to document with autodoc) are in another directory,
16# add these directories to sys.path here. If the directory is relative to the
17# documentation root, use os.path.abspath to make it absolute, like shown here.
18#
19# import os
20# import sys
21# sys.path.insert(0, os.path.abspath('.'))
22
23
24# -- Project information -----------------------------------------------------
25
26project = "Django Simple Options"
27copyright = "2017, Marcos Gabarda"
28author = "Marcos Gabarda"
29
30# The version info for the project you're documenting, acts as replacement for
31# |version| and |release|, also used in various other places throughout the
32# built documents.
33#
34# The short X.Y version.
35version = get_version(__name__, Path(__file__).parent.parent)
36# The full version, including alpha/beta/rc tags.
37release = version
38
39# -- General configuration ---------------------------------------------------
40
41# Add any Sphinx extension module names here, as strings. They can be
42# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43# ones.
44extensions: list = []
45
46# Add any paths that contain templates here, relative to this directory.
47templates_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.
52exclude_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 = 'alabaster'
61on_rtd = os.environ.get("READTHEDOCS", None) == "True"
62
63if not on_rtd:
64 import sphinx_rtd_theme
65
66 html_theme = "sphinx_rtd_theme"
67 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
68
69# Add any paths that contain custom static files (such as style sheets) here,
70# relative to this directory. They are copied after the builtin static files,
71# so a file named "default.css" will overwrite the builtin "default.css".
72html_static_path = ["_static"]