@snabbsajt/site-kit
v0.2.0
Published
Build, validate, and pack editable SnabbSajt site packages.
Readme
SnabbSajt Site Kit
Build a website in Next.js, React, plain HTML, or any other tool, then convert its content into a structured package that stays editable inside SnabbSajt.
Site Kit is intentionally not a code importer. It does not execute your React, CSS, JavaScript, or HTML inside SnabbSajt. You map the finished site to SnabbSajt's typed sections, validate it locally, and pack it as a safe bundle.
Status
0.2 is ready for its first npm beta release. The package format, validator,
HTML/WordPress converters, CLI, skills, and bundle format match the production
SnabbSajt importer. The packages are not public until the owner completes the
two-step npm release in docs/publishing.md.
Install from GitHub before the npm release
npm install github:HH-Studio/Sajtbuilder-SDK#mainOr clone the repository and use Bun:
git clone https://github.com/HH-Studio/Sajtbuilder-SDK.git
cd Sajtbuilder-SDK
bun install
bun run buildQuickstart
npx site-kit init ./my-site --template nextjs
npx site-kit validate ./my-site
npx site-kit pack ./my-site -o my-site.zipImport my-site.zip in SnabbSajt under Settings > Backup & move. The import
creates a new unpublished draft. It never overwrites or publishes a site.
No API key is needed. Every command runs locally.
To convert rendered HTML with the newer namespaced CLI:
npx @snabbsajt/[email protected] site import html https://example.com -o ./example-import
snabbsajt site import html https://example.com -o ./example-import
snabbsajt site import approve ./example-import --yes
snabbsajt site pack ./example-import -o example.zipAlways read import-report.md before approval. Unsupported behavior is reported
and stays inert; blocked content loss cannot be approved.
WordPress requires the current public site plus a WXR/XML export:
snabbsajt site import wordpress --url https://example.com --wxr export.xml --out ./convertedTyped authoring
import { DEFAULT_THEME, defineSite } from "@snabbsajt/site-kit";
export const site = defineSite({
format: "sajt-site",
version: 1,
exportedAt: new Date().toISOString(),
site: {
businessName: "North Studio",
vertical: "consultant",
goal: "show_services",
language: "en",
theme: DEFAULT_THEME,
contact: { email: "[email protected]" },
},
folders: [],
pages: [{ tmpId: "home", slug: "", title: "Home", order: 0, showInNav: true }],
sections: [{
pageTmpId: "home",
type: "hero",
variant: "image-right",
order: "a0",
content: { type: "hero", headline: "A useful headline" },
}],
fonts: [],
assets: [],
});defineSite() ties each section's outer type to its discriminated content type
and rejects unknown object-literal fields in TypeScript. site-kit validate
then runs the same runtime validators and caps used by the production importer.
Documentation
- Quickstart
- Convert a Next.js site
- Convert a plain HTML site
- Convert a WordPress site
- Package format
- CLI reference
- API reference
- Schema reference
- Security and limits
- Troubleshooting
- Publish
@snabbsajt/site-kit, then@snabbsajt/cli - Versioned skill archives and checksums
- Latest UX polish audit
- Code review backlog
- Public SnabbSajt developer docs
What Site Kit will not do
- Pixel-clone an arbitrary website.
- Run third-party JavaScript, tracking snippets, iframes, or React components.
- Preserve custom CSS frameworks.
- Publish without a human review.
- Invent missing business facts or copy.
Those limits are the point. Imported sites stay safe, responsive, accessible, and editable through SnabbSajt's normal section renderer.
Contributing
Run the full local gate before opening a change:
bun run checkReport schema drift or importer mismatches as a GitHub issue with a minimal
site.json. Do not include customer secrets or personal data.
