Skip to content

Site

nodekit.build_site

build_site(
    graph: Graph, savedir: PathLike | str
) -> BuildSiteResult

Build a static website for a Graph and save it to disk.

Parameters:

  • graph (Graph) –

    Graph to serialize and render into a site.

  • savedir (PathLike | str) –

    Directory to write the site into.

Returns:

  • BuildSiteResult

    BuildSiteResult with the site root, entrypoint, and dependency list.

Raises:

Site layout
assets/
    {mime-type-1}/{mime-type-2}/{sha256}.{ext}
runtime/
    nodekit.{js-digest}.js
    nodekit.{css-digest}.css
graphs/
    {graph_digest}/
        index.html

nodekit.SiteSubmission pydantic-model

Fields:

platform_context pydantic-field

platform_context: PlatformContext

Information about the platform (if any) that the Graph site was hosted on.

trace cached property

trace: Trace

Decompresses and decodes the gzipped base64 Trace.

Returns:

  • Trace

    Decompressed Trace object.

trace_gzipped_base64 pydantic-field

trace_gzipped_base64: str

The submitted Trace as base64-encoded gzipped JSON bytes.