Skip to content

Commit

Permalink
docs: Configure Sphinx, MyST, enable extensions
Browse files Browse the repository at this point in the history
Configure Sphinx extensions, configure MyST, enable some extensions,
to simplify creating beautiful-looking documentation.

Signed-off-by: Vangelis Koukis <[email protected]>
  • Loading branch information
vkoukis committed Jan 4, 2025
1 parent 8b104cf commit fce07bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["myst_parser", "sphinx_copybutton", "sphinx.ext.githubpages"]
extensions = ["myst_parser", "sphinx_copybutton", "sphinx_togglebutton",
"sphinx.ext.githubpages"]

templates_path = ["templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
Expand All @@ -32,3 +33,20 @@
"logo_height": 100,
"show_colorset_choices": True
}

# Enable MyST parser extensions based on
# https://myst-parser.readthedocs.io/en/stable/syntax/optional.html
myst_enable_extensions = [ "amsmath", "attrs_inline", "colon_fence", "deflist",
"dollarmath", "fieldlist", "html_admonition",
"html_image", "replacements",
"smartquotes", "strikethrough", "substitution",
"tasklist"]

# Have all external links open in a new window, so the reader doesn't lose
# track of our instructions. See
# https://github.com/executablebooks/MyST-Parser/issues/856
myst_links_external_new_tab = True

# Support parsing $$ even in inline contexts, i.e., inside a paragraph. See
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#dollar-delimited-math
myst_dmath_double_inline = True
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sphinx
sphinx-nefertiti
myst-parser
sphinx-copybutton
sphinx-togglebutton

0 comments on commit fce07bd

Please sign in to comment.