Architecture Documentation¶
Technical architecture documentation for the Zer0-Mistakes Jekyll theme. This documentation is intended for contributors and maintainers who need to understand the codebase structure.
Contents¶
| Document | Description |
|---|---|
| Project Structure | Overview of directory layout and file organization |
| Layouts and Includes | Template architecture and component system |
| UI/UX Component Spec | Single reference for every front-end component β source files, API surface, and test coverage (define/test/improve) |
| Build System | Jekyll build process and Docker configuration |
| Product Requirements Document | Vision, personas, feature requirements, technical and design specs |
| PRD: Roadmap and Metrics | Roadmap, KPIs, security, acceptance criteria |
Overview¶
The Zer0-Mistakes theme is built on:
- Jekyll 3.9.5 β Static site generator
- Bootstrap 5.3.3 β CSS framework (vendored in
assets/vendor/) - Docker β Development environment (Ruby 3.3-slim)
- Ruby Gems β Theme distribution (v0.22.13)
Key Directories¶
zer0-mistakes/
βββ _layouts/ # 16 page templates
β βββ root.html # Base HTML structure
β βββ default.html # Main wrapper with navigation
β βββ article.html # Blog posts (replaces journals)
β βββ admin.html # Admin dashboards
β βββ landing.html # Marketing/landing pages
β βββ news.html # News index
β βββ search.html # Search results
β βββ stats.html # Statistics dashboard
β βββ ... # collection, home, note, notebook, section, tag, etc.
βββ _includes/ # Reusable components
β βββ core/ # head, header, footer, branding
β βββ content/ # giscus, toc, seo, intro
β βββ analytics/ # posthog, google analytics/tag manager
β βββ navigation/ # sidebar, breadcrumbs, navbar, nav-tree
β βββ components/ # mermaid, alerts, cookie-consent, theme-info, searchbar
β βββ landing/ # Landing page sections
β βββ setup/ # Browser-based setup wizard
β βββ search/ # Search-related includes
β βββ stats/ # Statistics components
β βββ docs/ # Documentation-specific includes
βββ _sass/ # Stylesheets (core, theme, custom)
βββ _plugins/ # Jekyll plugins (theme_version.rb, etc.)
βββ assets/ # Static files
β βββ css/ # Compiled CSS
β βββ js/ # JavaScript modules (navigation, skin-editor, etc.)
β βββ images/ # Images and previews
β βββ vendor/ # Vendored Bootstrap, Icons, Mermaid, MathJax
βββ pages/ # Content collections
β βββ _posts/ # Blog posts (news sections)
β βββ _docs/ # User documentation
β βββ _notes/ # Developer reference notes
β βββ _notebooks/ # Jupyter notebooks
β βββ _quests/ # Tutorial content
βββ docs/ # Developer documentation (you are here)
βββ scripts/ # Build and automation scripts
β βββ bin/ # Executable scripts (build, release)
β βββ lib/ # Shared script libraries
β βββ platform/ # Platform-specific setup (macOS, Linux, WSL)
β βββ release/ # Release automation
β βββ utils/ # Utility functions
βββ templates/ # Scaffolding templates for new sites
βββ test/ # Test suite (core, deployment, quality, installation)
βββ docker/ # Docker configurations and publishing
Component Architecture¶
Layout Hierarchy¶
root.html β Base HTML structure
βββ default.html β Main wrapper with navigation
βββ home.html β Homepage
βββ article.html β Blog posts
βββ collection.html β Collection pages
βββ section.html β Section index pages
βββ search.html β Search results
βββ stats.html β Statistics dashboard
βββ note.html β Developer notes
βββ notebook.html β Jupyter notebooks
βββ tag.html β Tag pages
βββ sitemap-collection.html β Sitemap
landing.html β Landing/marketing pages
admin.html β Admin dashboards
news.html β News index (14 includes β near Liquid nesting limit)
Include Organization¶
- core/ β Essential page components (head, header, footer, branding)
- content/ β Content enhancement (TOC, comments, SEO, intro)
- analytics/ β Tracking and analytics (PostHog, Google Analytics, GTM)
- navigation/ β Navigation components (sidebar, breadcrumbs, navbar, nav-tree)
- components/ β Feature-specific components (mermaid, cookie-consent, theme-info, searchbar, skin-editor)
- landing/ β Landing page section components
- setup/ β Browser-based setup wizard includes
- stats/ β Statistics dashboard components
- docs/ β Documentation-specific includes
Configuration¶
The theme uses a dual-configuration system:
| File | Environment | Purpose |
|---|---|---|
_config.yml |
Production | Full configuration for deployment (remote_theme: bamr87/zer0-mistakes) |
_config_dev.yml |
Development | Overrides for local development (remote_theme: false) |
For Contributors¶
Before contributing, understand:
- Project Structure β Where files belong
- Layouts and Includes β Template conventions
- Build System β How to test changes
Related Documentation¶
- Release Automation β CI/CD and releases
- Development Setup β Getting started
- Dependency Management β Zero-pin strategy
- Ruby Version Management β Ruby 3.3 strategy