Skip to main content

Module site

Module site 

Source
Expand description

Generates the site from the configuration and builds it.

StructsΒ§

DistFileInfo πŸ”’
Metadata about a single file-type dist artifact, passed to Tera templates.
VersionEntry πŸ”’
A version entry as passed to Tera templates.

ConstantsΒ§

ATOM_FEED_FILENAME πŸ”’
TEMPLATE_ROOT_INDEX πŸ”’
TEMPLATE_VERSION_INDEX πŸ”’

FunctionsΒ§

archive_dir πŸ”’
Pack src directory into a .tar.gz archive at dest.
build_site
Build the full website into config.output_dir (defaults to public/).
compare_versions πŸ”’
copy_dir_recursive πŸ”’
Recursively copy the contents of src into dst.
find_doc_crates πŸ”’
Scan docs_dir for subdirectories that contain an index.html and return their names. Used to build a fallback listing when rustdoc itself did not generate a root index.html (typical for multi-crate workspaces).
generate_atom_feed πŸ”’
Generate an Atom 1.0 feed listing all known releases.
hex_sha256 πŸ”’
Compute a lowercase hex-encoded SHA-256 digest of data.
human_size πŸ”’
Format a byte count as a human-readable string (e.g. β€œ1.4 MB”).
load_config
Load the Abbaye2 configuration from the current working directory.
render_markdown πŸ”’
Render Markdown to an HTML string.
strip_v πŸ”’
Compare two version strings, preferring semver ordering and falling back to lexicographic comparison for non-semver strings (e.g. git describe output).
update_latest_symlink πŸ”’
Create or replace the latest symlink in output_dir, pointing to version_dir_name.
write_docs_index πŸ”’
Write a docs/index.html that either redirects straight to the single crate’s docs (one crate) or lists all crates (multiple crates).
xml_escape πŸ”’
Escape the five XML predefined characters in a string.