Skip to content

Repository files navigation

@temples: Declarative HTML Templates

@temples logo

@temples or templ(at)es are templates for HTML that you won't hate. Templates are plain HTML blocks decorated with a few data-bind attributes — no non-HTML syntax, no framework. The same templates render in the browser and on the server.

This repository is a Bun workspace monorepo. It is a rewriting of the original temples v0 template system, with jQuery replaced by a standard, DOM-based engine.

Packages

Package Description
@temples/engine The standalone Renderer: data-bind / data-iterate / data-render-if / data-show-if / data-hide-if, partial real-time updates, serialization.
@temples/components The TemplesComponent base class for declarative Web Components with reactive state.
@temples/ssr Server-side rendering and static site generation, wired to linkedom.
@temples/jquery The $.fn.temples(data) jQuery plugin (jQuery is a peer dependency).

Documentation

The documentation site is built in packages/docs — with temples itself. It deploys as a static site to https://zipang.github.io/temples/, and ships an llms.txt for AI coding agents.

Development

bun install            # install all workspaces
bun test               # run every package's tests
bun run check          # Biome format + lint
bun run typecheck      # tsc --noEmit
bun run build          # build all packages (engine first)
bun run dev            # serve the example app
bun run docs:build     # build the documentation site

Repository layout

packages/
  engine/       @temples/engine
  components/   @temples/components
  ssr/          @temples/ssr
  jquery/       @temples/jquery
  docs/         documentation site (private, built with temples)
example/        shopping-list demo app
tasks/          spec, plan, and task list

License

MIT

About

Templates that you won't hate!

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages