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_urlmap 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
targetagainstbase_dirand return either the matching vocs page URL (.sol) or a{repo}/blob/{commit}/...URL for any other relative path underroot. - 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
contenttopathonly if the file does not already exist. - write_
site_ files - Write all vocs site scaffolding into
out_dir.
Type Aliasesยง
- Source
ToUrl ๐ - Map from a Solidity source file location to its vocs page URL.