Skip to content

Commit

Permalink
Employs furo as HTML theme for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyfuture committed Jul 24, 2023
1 parent a638a2e commit 5421055
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 67 deletions.
2 changes: 2 additions & 0 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@media (prefers-color-scheme: dark) {body:not([data-theme="light"]) .sidebar-logo {filter: invert(1);}}
.sidebar-logo {max-height: 8em;}
32 changes: 0 additions & 32 deletions docs/_templates/sidebarintro.html

This file was deleted.

42 changes: 9 additions & 33 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import importlib
from pathlib import Path

import alabaster

if sys.version_info < (3, 6):
raise RuntimeError(
'Requires Python 3.6 or later, running on %s atm.' % '.'.join(sys.version_info)
Expand All @@ -43,7 +41,6 @@
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -100,7 +97,8 @@
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"
pygments_dark_style = "monokai"

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
Expand All @@ -110,40 +108,27 @@

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

# 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
# documentation.
html_theme_options = {
'logo': 'cerberus.png',
'logo_name': True,
'logo_text_align': 'center',
'github_user': 'pyeve',
'github_repo': 'cerberus',
'github_type': 'star',
'show_powered_by': False,
'description': 'Cerberus is a lightweight and extensible data validation library for Python',
# 'travis_button': True,
# 'show_related': True,
# 'travis_button': True,
"navigation_with_keys": True,
}

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

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = (
'Cerberus is a lightweight and extensible data validation library for Python'
)
html_title = "Cerberus — Data validation for Python"

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
html_logo = "_static/cerberus.png"

html_css_files = ["style.css"]

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand All @@ -164,16 +149,7 @@
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'**': [
'about.html',
'sidebarintro.html',
'navigation.html',
'relations.html',
'searchbox.html',
'donate.html',
]
}
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
7 changes: 7 additions & 0 deletions docs/external_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ Here are some recommended resources that deal with Cerberus.
If you find something interesting on the web, please amend it to this document
and open a pull request (see :doc:`contribute`).

Community forums
----------------

There's a `cerberus tag <https://stackoverflow.com/questions/tagged/cerberus>`_
on the Question & Answers platform *Stackoverflow*. The
`Google Group <https://groups.google.com/forum/?hl=en#!forum/python-eve>`_
regarding the mother project *Eve* may also a spot to seek these.

7 Best Python Libraries For Validating Data (February 2018)
-----------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ To join the backer ranks, check out `Cerberus campaign on Patreon`_.
Table of Contents
-----------------
.. toctree::
:maxdepth: 2

Installation <install>
Usage <usage>
Expand Down
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# requirements to build documentation
Sphinx
furo

0 comments on commit 5421055

Please sign in to comment.