Skip to content

Commit

Permalink
support markdown as a format for docs source (#277)
Browse files Browse the repository at this point in the history
* support markdown as a format for docs source

* Add a requirements.txt and switch to furo theme

* year

* automate copyright year
  • Loading branch information
ewdurbin committed Aug 5, 2022
1 parent 88dd56c commit 4d97ed2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
20 changes: 8 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

try:
import sphinx_rtd_theme
except ImportError:
sphinx_rtd_theme = None
from datetime import datetime

# -- General configuration ------------------------------------------------

Expand All @@ -25,13 +22,16 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = ['myst_parser']

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = ".rst"
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

# The encoding of source files.
# source_encoding = "utf-8-sig"
Expand All @@ -41,7 +41,7 @@

# General information about the project.
project = "Python Infrastructure"
copyright = "2019, Python Infrastructure Team"
copyright = f'{str(datetime.now().year)}, Python Infrastructure Team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -96,11 +96,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.

if sphinx_rtd_theme:
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
else:
html_theme = "default"
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
Expand Down
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
furo
sphinx
myst-parser
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ skipsdist = true

[testenv:docs]
deps =
sphinx
sphinx_rtd_theme
-rdocs/requirements.txt
basepython = python3
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Expand Down

0 comments on commit 4d97ed2

Please sign in to comment.