easyfabric.generate_docs
escape_except_code_spans
def escape_except_code_spans(string: str) -> str
Html-escape everything outside markdown code spans/blocks.
Replaces pydoc_markdown.util.misc.escape_except_blockquotes, whose
placeholder-restore pass corrupts the 11th and later code spans in a
docstring (BLOCKQUOTE_TOKEN_1 is substituted back before
BLOCKQUOTE_TOKEN_10, leaving mangled output like ```dry_run`0``).
apply_frontmatter_from_yaml
def apply_frontmatter_from_yaml(docs_dir, yaml_config_path)
Apply frontmatter settings from a YAMLA simple way to write configurations. It's basically a list that computers can read easily. configuration file to markdown files.
Arguments:
docs_dir- Path to the documentation directoryyaml_config_path- Path to the YAML configuration file
generate_documentation
def generate_documentation()
Generate markdown documentation from Python source files.
hide_from_sidebar
def hide_from_sidebar(root: Path) -> None
Idempotently hide every .md file under root from the Docusaurus
sidebar by setting one frontmatter flag:
sidebar_class_name: ef-hidden— picked up by the CSS rule in apps/documentation/www/src/css/custom.css to hide the sidebar entry Deliberately notunlisted: true: that would also drop the page from sitemap, search and llms.txt, which is where an assistant looks up the runtime API.