Skip to content

Project Structure

Overview of the Zer0-Mistakes theme directory layout and file organization.

Root Directory

zer0-mistakes/
β”œβ”€β”€ _config.yml           # Production Jekyll configuration
β”œβ”€β”€ _config_dev.yml       # Development overrides
β”œβ”€β”€ Gemfile               # Ruby dependencies
β”œβ”€β”€ Gemfile.lock          # Locked dependency versions
β”œβ”€β”€ docker-compose.yml    # Docker development environment
β”œβ”€β”€ Makefile              # Build automation shortcuts
β”œβ”€β”€ README.md             # Project overview
β”œβ”€β”€ CONTRIBUTING.md       # Contribution guidelines
β”œβ”€β”€ LICENSE               # MIT license
└── index.html            # Site homepage

Core Directories

_layouts/

Page templates that define the structure of different page types:

_layouts/
β”œβ”€β”€ root.html         # Base HTML structure (doctype, html, head, body)
β”œβ”€β”€ default.html      # Main wrapper with header, footer, sidebar
β”œβ”€β”€ home.html         # Homepage layout
β”œβ”€β”€ journals.html     # Blog post layout
β”œβ”€β”€ collection.html   # Collection index pages
β”œβ”€β”€ landing.html      # Full-width landing pages
β”œβ”€β”€ category.html     # Category archive pages
β”œβ”€β”€ tag.html          # Tag archive pages
└── stats.html        # Statistics dashboard

_includes/

Reusable HTML components organized by function:

_includes/
β”œβ”€β”€ core/             # Essential page structure
β”‚   β”œβ”€β”€ head.html     # <head> section with meta, CSS, scripts
β”‚   β”œβ”€β”€ header.html   # Site header and main navigation
β”‚   β”œβ”€β”€ footer.html   # Site footer
β”‚   └── scripts.html  # JavaScript includes
β”œβ”€β”€ content/          # Content enhancement
β”‚   β”œβ”€β”€ giscus.html   # Comments integration
β”‚   β”œβ”€β”€ toc.html      # Table of contents
β”‚   β”œβ”€β”€ seo.html      # SEO meta tags
β”‚   └── ...
β”œβ”€β”€ analytics/        # Tracking scripts
β”‚   β”œβ”€β”€ posthog.html
β”‚   └── google.html
β”œβ”€β”€ navigation/       # Navigation components
β”‚   β”œβ”€β”€ sidebar.html
β”‚   β”œβ”€β”€ breadcrumbs.html
β”‚   └── pagination.html
└── components/       # Feature-specific
    β”œβ”€β”€ mermaid.html
    β”œβ”€β”€ mathjax.html
    └── ...

_sass/

SCSS stylesheets:

_sass/
β”œβ”€β”€ core/             # Core theme styles
β”‚   β”œβ”€β”€ _variables.scss
β”‚   β”œβ”€β”€ _base.scss
β”‚   └── ...
β”œβ”€β”€ custom.scss       # User customizations
└── notebooks.scss    # Jupyter notebook styles

assets/

Static files served directly:

assets/
β”œβ”€β”€ css/
β”‚   └── main.scss     # Main stylesheet (imports _sass/)
β”œβ”€β”€ js/
β”‚   β”œβ”€β”€ main.js
β”‚   └── ...
└── images/
    └── ...

pages/

Content collections:

pages/
β”œβ”€β”€ _posts/           # Blog posts (date-prefixed)
β”œβ”€β”€ _docs/            # User documentation
β”œβ”€β”€ _quickstart/      # Quick start guides
β”œβ”€β”€ _about/           # About pages
β”œβ”€β”€ _notebooks/       # Jupyter notebooks
β”œβ”€β”€ index.html        # Pages index
β”œβ”€β”€ blog.md           # Blog listing
β”œβ”€β”€ categories.md     # Category listing
β”œβ”€β”€ tags.md           # Tag listing
└── ...

docs/

Developer documentation (this directory):

docs/
β”œβ”€β”€ README.md         # Documentation hub
β”œβ”€β”€ architecture/     # Codebase architecture
β”œβ”€β”€ systems/          # Automation systems
β”œβ”€β”€ implementation/   # Feature implementation details
β”œβ”€β”€ development/      # Development guides
β”œβ”€β”€ releases/         # Release notes
β”œβ”€β”€ configuration/    # Configuration guides
β”œβ”€β”€ templates/        # Documentation templates
└── archive/          # Historical documentation

scripts/

Build and automation scripts:

scripts/
β”œβ”€β”€ release           # Release automation
β”œβ”€β”€ build             # Gem building
β”œβ”€β”€ lib/              # Shared script libraries
β”‚   β”œβ”€β”€ common.sh
β”‚   β”œβ”€β”€ version.sh
β”‚   └── ...
└── test/             # Test scripts

_data/

Jekyll data files:

_data/
β”œβ”€β”€ navigation/       # Navigation configurations
β”‚   β”œβ”€β”€ main.yml
β”‚   β”œβ”€β”€ docs.yml
β”‚   └── ...
β”œβ”€β”€ authors.yml       # Author information
β”œβ”€β”€ ui-text.yml       # UI strings
└── ...

_plugins/

Custom Jekyll plugins:

_plugins/
└── theme_version.rb

Build Output

_site/                # Generated static site (gitignored)

Docker Configuration

docker/
β”œβ”€β”€ Dockerfile        # Container definition
β”œβ”€β”€ config/           # Docker-specific configs
└── README.md

Distribution

lib/                  # Gem library code
pkg/                  # Built gem packages
*.gemspec             # Gem specification

File Naming Conventions

Type Convention Example
Posts YYYY-MM-DD-title-slug.md 2026-01-24-getting-started.md
Docs kebab-case.md quick-start.md
Layouts lowercase.html journals.html
Includes kebab-case.html table-of-contents.html
Sass _partial.scss _variables.scss
Scripts kebab-case or snake_case.sh release, test_suite.sh