Skip to content

Commit

Permalink
resolve #162
Browse files Browse the repository at this point in the history
The MyST example doc is a bit raw, but it is meant to
encourage further contributions by providing a foundation to build on.
  • Loading branch information
2bndy5 committed Apr 28, 2023
1 parent 10ccd2a commit c62da57
Show file tree
Hide file tree
Showing 4 changed files with 559 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@
"sphinx_immaterial.apidoc.cpp.apigen",
"sphinx_immaterial.graphviz",
"sphinx_jinja",
"myst_parser",
]

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"sphinx_docs": ("https://www.sphinx-doc.org/en/master", None),
"MyST parser docs": ("https://myst-parser.readthedocs.io/en/latest", None),
}

# The reST default role (used for this markup: `text`) to use for all
Expand Down Expand Up @@ -440,6 +442,28 @@

graphviz_ignore_incorrect_font_metrics = True

# MyST parser config options
myst_enable_extensions = [
"deflist",
"fieldlist",
"smartquotes",
"replacements",
"strikethrough",
"substitution",
"tasklist",
"attrs_inline",
"attrs_block",
]

myst_enable_checkboxes = True
myst_substitutions = {
"role": "[role](#syntax/roles)",
}

# Myst parser's strikethrough plugin seems to think that sphinx-immaterial doesn't use
# HTML output (probably due to the custom translator mixin used).
suppress_warnings = ["myst.strikethrough"]


def _validate_parallel_build(app):
# Verifies that all of the extensions defined by this theme support parallel
Expand Down Expand Up @@ -509,6 +533,10 @@ def _parse_confval_signature(


def setup(app):
from myst_parser._docs import MystLexer

app.add_lexer("myst", MystLexer)

app.add_object_type(
"confval",
"confval",
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ or ``theme.conf`` for more details.
rst_basics
rst-cheatsheet/rst-cheatsheet
additional_samples
myst
Loading

0 comments on commit c62da57

Please sign in to comment.