> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytesell.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> A server-side template compiler that emits plain HTML, escaped by context.

Slurp is a templating engine. Pages, components and layouts are written as
`.slurp` files and compiled to plain HTML on the server. No framework is shipped
to the browser: a visitor downloads the generated HTML, and the client runtime
is optional.

It is comparable to a small Astro.

```slurp theme={"languages":{"custom":["/languages/slurp.json"]}}
---
using "@components/ProductCard"
props {
  products: any
}
---
{each product, i in products | limit(8) | sort("price")}
  <ProductCard product={product} featured={loop.first} />
{empty}
  <p>No products found.</p>
{/each}
```

Slurp renders templates the host did not write: themes from a marketplace, a
customer, or a model. Two design choices follow from that.

<CardGroup cols={2}>
  <Card title="No code runs at render time" icon="shield-check">
    One pass over a JSON context. No reactivity, no callable functions, no
    template-defined logic that could reach the host. A template is data
    transformed into markup, not a program.
  </Card>

  <Card title="Escaped by default, per context" icon="lock">
    An interpolation is escaped for the exact place it lands: HTML text, an
    attribute, a `style` attribute, a `srcdoc`, or a JavaScript string.
  </Card>
</CardGroup>

## Sections and blocks

A template declares a typed schema in its frontmatter. The values become
editable fields, so a non-technical person can change a heading, swap an image
or reorder a list through a form, and the template stays untouched.

```slurp theme={"languages":{"custom":["/languages/slurp.json"]}}
---
section {
  name: "Featured"
  settings {
    heading: text = "Featured products"
    limit:   number = 8 { min: 1, max: 24 }
  }
}
---
<h2>${ section.settings.heading }</h2>
```

The schema lives in the template, so it cannot drift from the markup.

## Failure behaviour

Slurp is **total and tolerant**. Missing data renders as the empty string,
resource budgets truncate rather than abort, and unknown editor settings are
dropped rather than rejected.

<Warning>
  Most Slurp mistakes are silent. A typo in a property name renders nothing
  rather than raising, so a broken template usually produces a plausible page
  instead of an error. Build with `--verbose` while developing, and read
  [Common mistakes](/slurp/troubleshooting/common-mistakes).
</Warning>

## Next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/slurp/quickstart">
    Build and render a real page in about five minutes.
  </Card>

  <Card title="Installation" icon="download" href="/slurp/installation">
    The CLI, the optional runtime, and the editor tooling.
  </Card>

  <Card title="Writing pages" icon="file-code" href="/slurp/guides/pages">
    File-based routing, page data, and output paths.
  </Card>

  <Card title="Working with agents" icon="robot" href="/slurp/tooling/agents">
    The MCP server and llms.txt files for coding agents.
  </Card>
</CardGroup>

## Status

Slurp is **0.1.0, pre-1.0**. The template language and the Rust API will both
change without a deprecation cycle until 1.0.

It was extracted from a production system where it renders multi-tenant sites,
so parsing, rendering, escaping and the resource budgets are exercised daily.
The edges are less settled: parts of the browser runtime are not yet wired to
compiler codegen and ship under `experimental/`, and the editor tooling and the
compiler disagree on a few points of syntax, where the compiler is right.
