Skip to content

Commit

Permalink
Use Sphinx Material theme for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Sep 15, 2020
1 parent a12dfb9 commit a350471
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 43 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Development
- Add function to discover available climate observations
(time resolution, parameter, period type)
- Make the CLI work again and add software tests to prevent future havocs
- Use Sphinx Material theme for documentation

0.6.0 (07.09.2020)
==================
Expand Down
71 changes: 70 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ def _get_project_meta():
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.todo",
"sphinx.ext.autosectionlabel",
"sphinx_rtd_theme",
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -74,3 +77,69 @@ def _get_project_meta():
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# -- Custom options -------------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# Use docstring from both class-level and __init__ when documenting a class.
autoclass_content = "both"


# -- Material options -------------------------------------------
import sphinx_material

html_show_sourcelink = True
html_sidebars = {
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
}

# Required theme setup
extensions.append('sphinx_material')
html_theme = 'sphinx_material'
html_theme_path = sphinx_material.html_theme_path()
html_context = sphinx_material.get_html_context()

# Material theme options (see theme.conf for more information)
html_theme_options = {

# Set the name of the project to appear in the navigation.
'nav_title': 'Wetterdienst',

# Set you GA account ID to enable tracking
#'google_analytics_account': 'UA-XXXXX',

# Specify a base_url used to generate sitemap.xml. If not
# specified, then no sitemap will be built.
'base_url': 'https://wetterdienst.readthedocs.io/',

# Set the color and the accent color
#'color_primary': 'blue',
#'color_primary': 'blue-grey',
#'color_primary': 'indigo',
'color_primary': 'light-blue',

# 'color_accent': 'light-green',

# Set the repo location to get a badge with stats
'repo_url': 'https://github.com/earthobservations/wetterdienst',
'repo_name': 'wetterdienst',

# Visible levels of the global TOC; -1 means unlimited
'globaltoc_depth': 2,
# If False, expand all TOC entries
#'globaltoc_collapse': False,
# If True, show hidden TOC entries
#'globaltoc_includehidden': False,

"master_doc": False,
"nav_links": [
],

"heroes": {
#"index": "Open weather data for humans.",
"pages/cli": "On your fingertips.",
},
}
172 changes: 131 additions & 41 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a350471

Please sign in to comment.