Create a project
node packages/cli/index.js create my-website --template saasChoose hello-world, saas, portfolio, blog, or documentation. Start with the Hello World tutorial if this is your first website.
Add a page
Inside the generated project, run the source CLI:
node /path/to/blocks-ui/packages/cli/index.js page create products/enterpriseAuthor content
Pages support HTML or Markdown with front matter. Keep presentation in layouts, repeated content in fragments, and authored content in pages.
Develop
npm run dev starts the local server with file watching and live reload. npm run build creates a deployable static directory.
Build programmatically
import { buildSite } from './packages/site/index.js';
await buildSite({
root: './my-site',
outDir: './my-site/dist',
base: '/my-site/',
site: { url: 'https://example.com' }
});The build is a trusted-content boundary: only build source you control. User-supplied Markdown and HTML must be sanitized before being added to a website.