Install StaticBlocks and create your first project in minutes
# Install StaticBlocks globally
npm install -g staticblocks
# Or use with npx
npx staticblocks init my-website
Install via npm or use directly with npx
# Create a new project
staticblocks init my-website
# Navigate to project
cd my-website
# Install dependencies
yarn install
# Start development server
yarn run dev
The init command will ask you about CSS framework, icons, and i18n preferences
├── src/
│ ├── templates/ # HTML templates
│ ├── blocks/ # Reusable blocks
│ ├── pages/ # Page configurations (YAML)
│ ├── locales/ # Translation files (JSON)
│ └── assets/ # Static assets
├── dist/ # Build output
├── staticblocks.config.ts
└── package.json
Overview of the main project directories and files
# Development server with hot reload
yarn run dev
# Production build
yarn run build
# Validate project
yarn run validate
Common commands for development and deployment