[Docs] Use cacheable myst_heading_slug_func value

Avoid creating an uncacheable conf variable by using a string instead of
a function reference. Also has the effect of avoiding triggering the
"config.cache" sphinx warning.

Requires myst_parser 0.19.0 (specifically
https://github.com/executablebooks/MyST-Parser/pull/696) which is over a
year old by now. Do we mandate any minimum version for these
dependencies?
This commit is contained in:
Scott Linder
2024-08-19 20:01:41 +00:00
parent db8ca88f57
commit 18cf14efe3
2 changed files with 2 additions and 6 deletions

View File

@@ -57,10 +57,8 @@ except ImportError:
raise
# Automatic anchors for markdown titles
from llvm_slug import make_slug
myst_heading_anchors = 6
myst_heading_slug_func = make_slug
myst_heading_slug_func = "llvm_slug.make_slug"
autodoc_default_options = {"special-members": True}

View File

@@ -40,10 +40,8 @@ except ImportError:
raise
# Automatic anchors for markdown titles
from llvm_slug import make_slug
myst_heading_anchors = 6
myst_heading_slug_func = make_slug
myst_heading_slug_func = "llvm_slug.make_slug"
# Add any paths that contain templates here, relative to this directory.