- Base Framework is Nuxt 4
- Uses b10cks CMS
- Provides a basic content structure to get started
- Includes VueUse for common Vue utilities
- Includes Tailwind CSS for styling
- Includes nuxt-schema-org for structured data
- TypeScript support
- Configures OxLint and OxFmt with opinionated rules
- Sensible defaults for Zed editor
Make sure you've installed the b10cks CLI:
# Using bun
bun install -g b10cks-cli
# Using npm
npm install -g b10cks-cli
# Using yarn
yarn global add b10cks-cliUse the following command to create a new project based on this boilerplate. Replace <project-name> with the actual name of your project.
# bun
bunx create b10cks/nuxt-boilerplate <project-name>
# npm
npx degit b10cks/nuxt-boilerplate <project-name>Follow these steps to set up b10cks:
- Create a new b10cks account at b10cks.com.
- Create a new space in b10cks.
- Create a new API token in the space settings
- Go to
Configuration > Access Tokensand clickGenerate Token. - Copy the token and put into
.envfile.
- Go to
- Login via the CLI using
b10cks login
# bun
bun install
# npm
npm install
# yarn
yarn installThe dev server runs over HTTPS, so it needs localhost.crt and localhost.key in the project root. Create a self-signed pair with:
openssl req -x509 -newkey rsa:4096 -keyout localhost.key -out localhost.crt -days 365 -nodes -subj "/CN=localhost"Start the development server on https://localhost:3001:
# bun
bun run dev
# npm
npm run dev
# yarn
yarn devBuild the application for production:
# bun
bun run build
# npm
npm run build
# yarn
yarn buildLocally preview production build:
# bun
bun run preview
# npm
npm run preview
# yarn
yarn previewAny CDN in front of this app must include b10cks_rv and b10cks_vid in its cache key.
Those are the two query params the b10cks editor uses to request a specific revision and a specific version. A CDN that strips them from the cache key answers a preview request with the cached published page, so editors see stale content and cannot tell why. This is the easiest way to break preview in production.
On CloudFront, add both to the cache policy's query string allowlist. On Cloudflare, add them to the Cache Key query string include list.