Skip to content

Commit

Permalink
Use sphinx-material theme
Browse files Browse the repository at this point in the history
  • Loading branch information
thebigmunch committed Jan 11, 2020
1 parent 90dbb5a commit 35a1537
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
29 changes: 19 additions & 10 deletions docs/conf.py
Expand Up @@ -3,6 +3,8 @@
import os
import sys

import sphinx_material

project_dir = os.path.abspath(os.pardir)
sys.path.insert(0, os.path.join(project_dir, 'src'))

Expand All @@ -14,7 +16,8 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinxarg.ext'
'sphinxarg.ext',
'sphinx_material',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -77,19 +80,27 @@

# -- Options for HTML output ----------------------------------------------

html_theme = 'alabaster'
html_theme = 'sphinx_material'

# 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 = {
'github_user': 'thebigmunch',
'github_repo': 'thorod',
'github_type': 'star',
'show_powered_by': False
'nav_title': 'thorod',
'color_primary': 'blue',
'color_accent': 'deep-orange',
'repo_url': 'https://github.com/thebigmunch/thorod',
'repo_name': 'thorod',
'globaltoc_includehidden': True,
'master_doc': False,
}

# Get the them path
html_theme_path = sphinx_material.html_theme_path()
# Register the required helpers for the html context
html_context = sphinx_material.get_html_context()

# 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".
Expand All @@ -103,10 +114,8 @@

html_sidebars = {
'**': [
'about.html',
'globaltoc.html',
'localtoc.html',
'relations.html',
'searchbox.html',
'donate.html',
]
}
9 changes: 6 additions & 3 deletions pyproject.toml
Expand Up @@ -37,6 +37,7 @@ flake8-import-order-tbm = { version = "^1.0", optional = true }
nox = { version = "^2019", optional = true }
sphinx = { version= "^2.0", optional = true}
sphinx-argparse = { version = "^0.2", optional = true }
sphinx-material = { version= "0.*", optional = true }

[tool.poetry.extras]
dev = [
Expand All @@ -47,18 +48,20 @@ dev = [
"flake8-import-order-tbm",
"nox",
"sphinx",
"sphinx-argparse"
"sphinx-argparse",
"sphinx-material",
]
doc = [
"sphinx",
"sphinx-argparse"
"sphinx-argparse",
"sphinx-material",
]
lint = [
"flake8",
"flake8-builtins",
"flake8-comprehensions",
"flake8-import-order",
"flake8-import-order-tbm"
"flake8-import-order-tbm",
]

[tool.poetry.scripts]
Expand Down

0 comments on commit 35a1537

Please sign in to comment.