Quick start #
This guide walks you through scaffolding a project, running it locally, adding a page, and producing your first build. Follow along from top to bottom and you will have a working Glaze site by the end.
Scaffold a project #
Choose the scaffold mode that matches your workflow:
glaze init my-site
glaze init my-site --preset vite
glaze init my-site --title "My Site" --yes
Glaze asks a few questions interactively by default (title, base URL, taxonomies).
This creates:
my-site/
content/
index.dj
static/
templates/
page.sugar.php
glaze.neon
When --preset vite is used, it also adds:
my-site/
vite.config.js
package.json
Explore the scaffold #
glaze.neon is the site configuration:
pageTemplate: page
site:
title: My Site
content/index.dj is the home page:
---
title: Home
slug: /
---
# Welcome
This is my site.
templates/page.sugar.php is the default page template:
<s-template s:extends="layout/page">
<s-template s:block="content">
<h1><?= $title ?></h1>
<?= $content |> raw() ?>
</s-template>
Start the development server #
cd my-site
glaze serve
cd my-site
npm install
glaze serve --vite
Open http://127.0.0.1:8080. The server renders each page on request – edit content or templates and refresh to see changes immediately.
Then reference assets in your layout template using Sugar’s Vite directive:
<s-vite src="['assets/css/site.css']" />
Add a page #
glaze new
glaze new "My first post" --yes
This writes content/my-first-post.dj with a frontmatter stub:
---
title: My first post
date: 2026-02-24
draft: false
---
# My first post
Build static output #
When you are ready to ship:
glaze build
Output lands in public/. To clean before building:
glaze build --clean
During build, Glaze:
-
renders all non-draft
.djfiles to HTML inpublic/ -
copies non-Djot files from
content/to matching paths inpublic/ -
copies everything in
static/verbatim topublic/ -
bakes Glide image transforms to static files under
public/_glide/
Next steps #
You have a working site. From here:
- Content & routing — how files become pages, URL rules, frontmatter, content types, and static files
- Daily workflow — dev server, drafts, creating pages, building
- Templating — Sugar layouts, components, variables, and directives
- Frontmatter — full metadata field reference
- Commands — complete CLI option reference
-
Scaffold presets — built-in presets, custom presets, and
scaffold.neonformat