Skip to main content

Module vocs

Module vocs 

Source
Expand description

Vocs site file generation.

Generates vocs.config.ts, pages/index.mdx, package.json, and .gitignore from the emitted MDX pages.

Functionsยง

build_sidebar ๐Ÿ”’
Build a TypeScript sidebar array string from the list of relative page paths.
build_source_to_url ๐Ÿ”’
Build a (parent_dir, file_stem) -> vocs_url map from the emitted MDX pages.
escape_mdx_outside_code_fences ๐Ÿ”’
Escape MDX-sensitive characters ({ and <) in plain-text regions of a Markdown document, leaving fenced code blocks (``` or ~~~) untouched.
find_homepage ๐Ÿ”’
Locate the homepage markdown.
json_str ๐Ÿ”’
normalize_path ๐Ÿ”’
Lexically resolve . and .. components without touching the filesystem.
package_json ๐Ÿ”’
rewrite_homepage_links ๐Ÿ”’
Rewrite inline [text](url) markdown links in the homepage:
try_rewrite_target ๐Ÿ”’
Resolve target against base_dir and return either the matching vocs page URL (.sol) or a {repo}/blob/{commit}/... URL for any other relative path under root.
type_category_label ๐Ÿ”’
Human-readable label for a type category.
type_category_order ๐Ÿ”’
Canonical sort order for type categories in the sidebar.
vocs_config ๐Ÿ”’
Generate the user-editable vocs.config.ts.
vocs_sidebar ๐Ÿ”’
write_if_absent ๐Ÿ”’
Write content to path only if the file does not already exist.
write_site_files
Write all vocs site scaffolding into out_dir.

Type Aliasesยง

SourceToUrl ๐Ÿ”’
Map from a Solidity source file location to its vocs page URL.