@anzaui/engine - v0.6.0
    Preparing search index...

    Class Manifest

    Template name to content digest, returned by Engine.manifest.

    Digests are lowercase hex SHA-256 of the file contents, the same in the Rust and Python engines, so manifests match across engines for the same files. Use them for cache busting or to check that two servers loaded the same templates.

    const manifest = engine.manifest();
    for (const [name, digest] of Object.entries(manifest.templates)) {
    console.log(`${name} -> ${digest.slice(0, 12)}`);
    }
    Index
    templates: Record<string, string> = {}

    Template name (e.g. feed/card.html) to lowercase hex SHA-256 digest.

    • The digest of name, or undefined when it is not in the manifest.

      Parameters

      • name: string

        Template name relative to the root.

      Returns string | undefined

    • Record the digest of a template.

      Parameters

      • name: string

        Template name relative to the root.

      • digest: string

        Lowercase hex SHA-256 of the template contents.

      Returns void