Static Sites

Build a declared static-site artifact

An Elide project can declare a static-site artifact that processes scripts, stylesheets, and Markdown, then copies the remaining sources into a site output.

amends "elide:project.pkl"
import "elide:Web.pkl" as Web

artifacts {
  ["site"] = new Web.StaticSite {
    srcs = "site"
    domain = "example.com"
    stylesheets { "site/theme.css" }
    hosting = "github-pages"
  }
}

Build declared artifacts with:

elide build

The hosting field accepts workers or github-pages. It describes the target but does not publish the site by itself.

Image optimization is not implemented in 1.5.0. Do not rely on a static-site build to compress or convert image files.

For one-off TypeScript, Markdown, or CSS processing without a project manifest, use elide web build; see Web Toolchain.

See the elide.pkl Reference for the current artifact fields.