Before We Start
Why This Approach?
Static site generators like Metalsmith and Eleventy excel at one thing: staying out of your way. Unlike opinionated frameworks that dictate how you must structure content, organize files, or build pages, these tools provide the foundation and let you make the architectural decisions.
This component library represents a structured content approach where pages are composed from reusable sections defined in frontmatter rather than written in Markdown. Some might argue this is "too specific" for tools designed to be flexible. I see it differently.
Every tool becomes specific the moment you use it. The choices you make—how you organize content, structure templates, handle assets—these decisions define your project's architecture. The question isn't whether to make opinionated choices, but whether those choices align with modern web development practices and scale with your needs.
Component-based architecture isn't just my preference—it's become a widely acknowledged pattern for building maintainable websites. React, Vue, and modern frontend frameworks have proven the value of composable, reusable components. This library brings that same paradigm to static site generation with Nunjucks templates, demonstrating that you can have both the flexibility of a minimal build tool and the structure of a component system.
These components work with any Nunjucks-based static site generator. If you value component reusability, separation of concerns, and a clear content model that scales from simple landing pages to complex multi-section layouts, this approach might be yours too.