Skip to content

Commit

Permalink
Merge pull request #27 from sparks-baird/docs
Browse files Browse the repository at this point in the history
refactor to latest extension version, uses myst-parser instead
  • Loading branch information
sgbaird committed May 27, 2022
2 parents eee5f19 + 5d31015 commit b63a3cc
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,22 @@
templates_path = ["_templates"]


# Configure AutoStructify
# https://recommonmark.readthedocs.io/en/latest/auto_structify.html
def setup(app):
from recommonmark.transform import AutoStructify

params = {
"enable_auto_toc_tree": True,
"auto_toc_tree_section": "Contents",
"auto_toc_maxdepth": 2,
"enable_eval_rst": True,
"enable_math": True,
"enable_inline_math": True,
}
app.add_config_value("recommonmark_config", params, True)
app.add_transform(AutoStructify)


# Enable markdown
extensions.append("recommonmark")
extensions.append("myst_parser")

# Configure MyST-Parser
myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"html_image",
"linkify",
"replacements",
"smartquotes",
"substitution",
"tasklist",
]

# The suffix of source filenames.
source_suffix = [".rst", ".md"]
Expand Down Expand Up @@ -174,15 +171,12 @@ def setup(app):

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

# 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 = {
"sidebar_width": "300px",
"page_width": "1200px"
}
html_theme_options = {"sidebar_width": "300px", "page_width": "1200px"}

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
Expand Down Expand Up @@ -304,4 +298,4 @@ def setup(app):
"pyscaffold": ("https://pyscaffold.org/en/stable", None),
}

print(f"loading configurations for {project} {version} ...", file=sys.stderr)
print(f"loading configurations for {project} {version} ...", file=sys.stderr)

0 comments on commit b63a3cc

Please sign in to comment.