TYPESCRIPT · ASTRO CONTENT COLLECTIONS
GitHub ↗
astro-dev-mock-generator — Zod-Compliant Mock Content Generator for Astro
astro-dev-mock-generator reads your Astro Content Collection Zod schemas and synthesizes realistic Markdown and JSON fixture entries for local testing. It stress-tests UI layouts with edge-case titles, nested arrays, and multilingual text without calling external cloud APIs.
$ npm install -D astro-dev-mock-generator
01. Architectural Specifications
STATUS: PRODUCTION READY
[ 01 // CAPABILITY ]
Zod Schema Compliant
Generates YAML frontmatter and markdown body matching exact collection schema constraints.
[ 02 // CAPABILITY ]
Themed Prompting
Select custom scenario prompts (e.g., edge incident report, product teardown, technical tutorial).
[ 03 // CAPABILITY ]
Zero Repo Clutter
Preview and test dynamic layouts without checking temporary dummy markdown files into git.
02. Implementation & Usage
BUN / ASTRO 5+
// Installation
CLI
bun add astro-dev-mock-generator
# or
pnpm add astro-dev-mock-generator
// Configuration
astro.config.mjs
// astro.config.mjs
import { defineConfig } from "astro/config";
import devMockGenerator from "astro-dev-mock-generator";
export default defineConfig({
integrations: [
devMockGenerator({
collections: ["blog", "docs", "changelog", "products"]
})
]
});
// Chrome Built-in AI Prerequisites
- 1. Open
chrome://flagsin Google Chrome 128+ - 2. Set
#prompt-api-for-gemini-nanoto Enabled - 3. Set
#optimization-guide-on-device-modelto Enabled ByPassPerfRequirement - 4. Restart Chrome and verify model status at
chrome://components