PitchHut logo
frontmatter-core
The data layer between Astro and real CMS
Pitch

Frontmatter Core scans Astro, Markdown and YAML to generate a clean, typed JSON content model that any CMS can consume — without changing how you build your frontend.

Description

Frontmatter Core serves as a powerful developer tool that seamlessly integrates Astro projects with headless CMS solutions. It functions as a zero-runtime CMS bridge, transforming your data structure without compromising the speed and simplicity of your static site.

Key Features

Frontmatter Core meticulously analyzes:

  • Astro Files: Including .astro components and pages.
  • Markdown Pages: Such as .md, .mdoc, and .markdown files.
  • YAML Datasets: Specifically, those located in src/data using .yml or .yaml formats.

By scanning these files, it generates a coherent Internal Representation (IR) that outlines:

  • Pages
  • Editable Fields
  • Components
  • Data Collections

The output is structured and stored within a .frontmatter/ directory, ready to be utilized by various adapters for creating CMS themes and content structures. The files generated include:

.frontmatter/
  build.json     → the complete site model
  manifest.json  → file hashes for sync
  errors.json    → any validation errors found

Development Philosophy

Unlike traditional CMS platforms that often disrupt frontend quality, Frontmatter Core empowers developers by allowing them to create and manage the design in Astro first. Editors can engage with the content without altering the website’s structure. This utility does not operate as a site builder or a WYSIWYG (What You See Is What You Get) editor; rather, it acts as a data layer that delineates the responsibilities between design and content management.

Usage and Command Line Interface

With the CLI command frontmatter scan, users can initiate the scanning process, leading to the creation of the .frontmatter/ directory for project data validation, executed with frontmatter validate.

Component Control and CMS Interactivity

Frontmatter Core distinctly separates the roles of Astro, which manages layout, SEO, and components, from those of a CMS, which provides control over text, images, and metadata, ensuring they function without conflict.

Conclusion

This repository focuses solely on the core engine, facilitating the essential bridge between Astro and content management systems while allowing customization and control over the resulting architecture. As an early developer release, Frontmatter Core is designed with a stable internal schema, providing a foundation for developers looking to integrate CMS functionalities into their Astro applications.

0 comments

No comments yet.

Sign in to be the first to comment.