@zeropress/create-theme
v0.6.4
Published
ZeroPress theme starter generator
Maintainers
Readme
@zeropress/create-theme
Public ZeroPress starter generator for Theme Runtime v0.6.
This package creates a buildable ZeroPress starter project for the
preview-data.json + theme/ workflow. The five starter templates are bundled
inside the npm package.
It uses directly:
- @zeropress/theme-validator to validate generated theme output
Generated starter projects use:
- @zeropress/theme for local theme preview
- @zeropress/build for static site output
Public contract references:
Quick Start
npx @zeropress/create-theme --name my-portfolio --template portfolio
cd my-portfolio
npm install
npm run buildThe build output is written to dist/.
For local preview while developing the theme:
npm run devAfter editing the generated theme, use npm run build to produce static output
with @zeropress/build.
Usage
npx @zeropress/create-theme --name <slug> --template <template>The npm package is @zeropress/create-theme, and the installed binary is
zeropress-create-theme.
Required Options
--name <slug>: starter directory name and generatedtheme.json.slug--template <template>:minimal,blog,docs,portfolio, ormagazine
Other Options
--help,-h: show help--version,-v: show package version
Templates
The package intentionally ships only five built-in starters:
minimal: quiet content-first starter.blog: editorial blog starter with menus, widgets, posts, categories, and tags.docs: documentation starter with pages, navigation, and Markdown-friendly prose.portfolio: portfolio starter using site metadata and named collections.magazine: editorial magazine starter with curated landing sections.
Remote theme catalog downloads are not part of this package. Additional themes belong in the ZeroPress theme catalog and admin runtime install flow.
Generated Project
my-portfolio/
package.json
preview-data.json
theme/
theme.json
layout.html
index.html
post.html
page.html
archive.html
category.html
tag.html
404.html
partials/
assets/Generated package.json includes:
{
"scripts": {
"clean": "rm -rf ./dist",
"build": "npm run clean && zeropress-build ./theme --data ./preview-data.json --out ./dist",
"dev": "zeropress-theme dev ./theme --data ./preview-data.json"
},
"dependencies": {
"@zeropress/build": "0.6.1",
"@zeropress/theme": "0.6.1"
}
}Generated theme/theme.json is rewritten with:
$schema: "https://schemas.zeropress.dev/theme-runtime/v0.6/schema.json"runtime: "0.6"namespace: "my-company"slugandnamefrom--nameversion: "0.1.0"
Update namespace, name, and demo fixture content before publishing a theme.
Validation
The generated theme is validated immediately with
@zeropress/theme-validator.
The package test suite validates and builds every bundled starter.
Legacy Package
The old unscoped package name, create-zeropress-theme, is retained only as a
compatibility notice. New usage should prefer:
npx @zeropress/create-themeLicense
MIT
