Getting Started

Install StaticBlocks and create your first project in minutes

Installation

# 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 Your First Project

# 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

Project Structure

├── 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

Build Commands

# Development server with hot reload
yarn run dev

# Production build
yarn run build

# Validate project
yarn run validate

Common commands for development and deployment

Next Steps