Skip to main content

Directory Structure

Overdog's directory structure is built on the philosophy of "Convention over configuration." This approach dictates that each entry types template file is named index.twig and resides within a directory that represent its handle.

Note: The directory structure has been update for the upcoming version 5.0 of Craft CMS.

Templates folder

├── _abstracts        # Contains font-face declarations and webpack generated files
│   ├── critical      # Critical CSS files, specific for the homepage
├── _base             # Layout templates
├── _components       # Reusable components
├── _macros           # Twig macro files for reusable code snippets
├── _navigation       # Navigation, navbar and menus
├── _pages            # Entries templates
├── 404.twig          # Template for 404 error page
├── sitemap.xml.twig  # Sitemap template, customizable for the project
└── robot.txt         # Instructions for web crawlers

Note: Prepending folders with an underscore (_) prevents direct web access to these folders.

SRC and config folders

In addition to templates, the project is structured with src and config directories for managing assets and configurations.

├── ejs                 # EJS templates used by Webpack.
├── js                  # JavaScript files.
├── css                 # Custom Tailwind CSS files.
└── svg
    └── sprite-images   # Source SVG files to be included in the sprite.

├── project             # Automatically generated YAML files for admin structure.
├── redactor            # Custom configurations for the Redactor text editor.
└── general.php         # General project configuration file.