create-mechanica
v0.2.1
Published
Scaffold a new Mechanica site — a Vue 3 website with a visual block editor
Downloads
336
Readme
create-mechanica
Scaffold a new Mechanica site — a Vue 3 website with a visual block editor.
npm create mechanica@latest my-site
# or
bun create mechanica my-site
cd my-site
npm install
npm run devGenerated projects run on plain Node ≥ 20.19 (npm/pnpm/yarn) or Bun.
What you get
src/blocks/— starter blocks (Hero,Rich text) showing thedefineBlockmacro,previewData, and manual code splitting (chunk).mech/pages/index.page.md— a starter page in Mechanica's human-readable page format- Rich-text rendering wired end to end (
RichTextView+ shared renderer config) {{ head.* }}metadata templating from a page-scoped data entry- Static export via
npm run export
Development (this package)
The CLI (index.js) is dependency-free, plain Node-compatible ESM. The template/ directory is published verbatim; _gitignore is renamed to .gitignore on scaffold (npm strips real .gitignore files from packages).
Template dependencies pin published versions (never workspace:*) — bump them when releasing mechanica.
