Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Astro starter designed to generate Twig or PHP templates with Frontmatter Solo.
FM Solo Starter is a minimal Astro starter built to the Frontmatter Solo contract, letting developers build a static site in Astro and generate Twig or PHP templates for backend handoff.
FM Solo Starter is an Astro starter project that follows the Frontmatter Solo contract, so a first frontmatter solo:build render pack succeeds without surprises. It takes Astro components, layouts, pages, and SCSS styles as input, and produces a static site in dist/ plus stable asset paths under public/assets/ for backend handoff. The project is designed for use with Frontmatter Solo and includes a CLI validation step to confirm contract readiness before generating templates.
public/ are enforced through the npx @withfrontmatter/solo-check command.public/assets/css/ and public/assets/js/ so backends get consistent file locations.frontmatter solo:build --adapter twig or PHP templates with --adapter php.src/styles/styles.scss with CSS custom properties and BEM naming, with no scoped CSS.index, contact, showcase, and 404 pages in src/pages/.public/assets/css/styles.css and keeping the build step's minification.npx @withfrontmatter/solo-check exits with 0 when the project is ready and lists exactly what to fix when it exits with 1.frontmatter solo:build --adapter twig to emit Twig render packs for CMS-driven sites.frontmatter solo:build --adapter php to emit PHP templates for Laravel or other PHP backends.npx @withfrontmatter/solo-check to confirm the project passes the Solo contract before any render-pack build.npm install or pnpm install.npx @withfrontmatter/solo-check and confirm exit code 0.npm run dev; SCSS and JS are served through Astro for authoring.npm run build to generate dist/ and the stable public/assets/ files.frontmatter solo:build using either the Twig or PHP adapter.The Solo contract defines rules a project must follow to produce render packs: one layout per page, literal props only, global CSS, and static images from public/. FM Solo Starter follows these rules out of the box, and solo-check verifies them.
The starter supports two adapters: Twig and PHP. You select one by passing --adapter twig or --adapter php to the frontmatter solo:build command.
Yes. Move your source stylesheet to public/assets/css/styles.css, keep the same layout references, and the build will only minify it. The SCSS entry point in src/styles/styles.scss is the default.
The build produces bundled and minified JS files in public/assets/js/, with main.js and main.min.js. In development, JS is served directly via Astro from src/scripts/main.js.
The starter includes four pages: index, contact, showcase, and 404. Each page uses one layout, as required by the Solo contract.
