Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/166.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Changed the documentation theme to Alabaster
18 changes: 10 additions & 8 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# serve to show the default.

import sys, os
import sphinx_rtd_theme
import alabaster

# If extensions (or modules to document with autodoc) are in another directory,
# 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.
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("../src"))

from hamcrest import __version__

Expand All @@ -28,9 +28,10 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx"]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "alabaster"]

autodoc_default_options = {"members": None, "show-inheritance": None}
autodoc_typehints = "description"
intersphinx_mapping = {"python": ("http://docs.python.org/3", None)}

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -53,10 +54,11 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = __version__
version = __version__

# The short X.Y version.
release = ".".join(version.split(".")[:2])

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -97,7 +99,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "sphinx_rtd_theme"
html_theme = "alabaster"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -106,7 +108,7 @@

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_path = [alabaster.get_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def read(fname):

assert __version__ is not None

REQUIREMENTS_DOCS = ["sphinx~=3.0", "sphinx_rtd_theme~=0.4"]
REQUIREMENTS_DOCS = ["sphinx~=3.0", "alabaster~=0.7"]
TESTS_BASIC = ["pytest>=5.0", "pytest-sugar", "coverage"]
TESTS_NUMPY = ["numpy"]
DEV_TOOLS = [
Expand Down