-
-
Notifications
You must be signed in to change notification settings - Fork 1
File Structure
This page documents the directory layout and file organization of the Aegis theme repository.
aegis/
├── assets/ # Source files (CSS, JS, images)
├── blocks/ # Custom block source files
├── build/ # Compiled assets (generated)
├── inc/ # PHP classes (PSR-4 autoloaded)
├── languages/ # Translation files
├── parts/ # Template parts
├── patterns/ # Block patterns
├── styles/ # Style variations
├── templates/ # Page templates
├── vendor/ # Composer dependencies (generated)
├── .editorconfig # Editor formatting rules
├── .wp-env.json # wp-env Docker configuration
├── block.json # Theme-level block metadata
├── composer.json # PHP dependencies
├── composer.lock # Locked PHP dependency versions
├── functions.php # Theme bootstrap
├── package.json # Node.js dependencies
├── package-lock.json # Locked Node dependency versions
├── phpcs.xml.dist # PHPCS configuration
├── phpunit.xml.dist # PHPUnit configuration
├── readme.txt # WordPress.org readme
├── screenshot.png # Theme screenshot
├── style.css # Theme metadata header
├── theme.json # Design tokens and settings
└── webpack.config.js # Webpack build configuration
Source files for CSS, JavaScript, and static assets:
assets/
├── css/
│ ├── frontend/ # Frontend stylesheets
│ │ ├── blocks/ # Per-block frontend styles
│ │ └── integrations/ # Plugin compatibility styles
│ └── editor/ # Editor-only stylesheets
├── js/
│ ├── frontend/ # Frontend JavaScript
│ │ └── blocks/ # Per-block frontend scripts
│ └── editor/ # Editor-only JavaScript
├── fonts/ # Self-hosted font files
│ ├── lexend/ # Lexend variable font
│ ├── lexend-deca/ # Lexend Deca variable font
│ └── jetbrains-mono/ # JetBrains Mono font
└── images/ # Theme images and icons
Custom block source code, one directory per block:
blocks/
├── countdown/
│ ├── block.json # Block metadata
│ ├── index.js # Editor registration
│ ├── edit.js # Editor component
│ ├── save.js # Save output
│ ├── render.php # Server-side render
│ ├── view.js # Frontend interactivity
│ └── style.css # Block styles
├── slider/
├── slide/
├── toggle/
├── toggle-content/
├── video/
└── related-posts/
Generated by npm run build. Contains compiled, production-ready assets:
build/
├── blocks/
│ ├── countdown/
│ │ ├── index.js
│ │ ├── index.asset.php
│ │ ├── style-index.css
│ │ └── index.css
│ ├── slider/
│ ├── slide/
│ ├── toggle/
│ ├── toggle-content/
│ ├── video/
│ └── related-posts/
├── css/
│ ├── frontend.css
│ └── editor.css
└── js/
└── frontend.js
Note: The
build/directory is generated and should not be manually edited. It is excluded from version control in development but included in release packages.
PHP classes following PSR-4 autoloading under the Aegis\ namespace:
inc/
├── Aegis.php # Main bootstrap class
├── Assets/
│ ├── AssetLoader.php # Conditional asset enqueueing
│ ├── FontLoader.php # Font registration
│ └── ScriptLoader.php # JavaScript loading
├── Blocks/
│ ├── BlockRegistrar.php # Block registration
│ ├── BlockStyles.php # Block style registration
│ └── BlockVariations.php # Block variations
├── Patterns/
│ └── PatternRegistrar.php # Pattern registration
├── Templates/
│ └── TemplateLoader.php # Template resolution
├── Features/
│ ├── Analytics.php # Analytics framework
│ ├── ConditionalLogic.php # Block visibility
│ ├── DarkMode.php # Dark mode handling
│ └── HookPatterns.php # Content injection
├── Integrations/
│ ├── WooCommerce.php # WooCommerce support
│ └── PluginCompat.php # Plugin compatibility
├── Support/
│ ├── ThemeSupport.php # Theme support declarations
│ └── EditorSupport.php # Editor features
└── Utilities/
└── Helpers.php # Utility functions
Translation files:
languages/
└── aegis.pot # Translation template
Template parts (reusable template sections):
parts/
├── header.html # Site header
├── footer.html # Site footer
└── sidebar.html # Optional sidebar
Block patterns as PHP files:
patterns/
├── 404/
│ ├── 404-simple.php
│ ├── 404-illustrated.php
│ └── 404-suggested-links.php
├── about/
├── author/
├── blog/
├── commerce/
├── contact/
├── cta/
├── event/
├── faq/
├── feature/
├── footer/
├── header/
├── hero/
├── hidden/
├── library/
├── logos/
├── modal/
├── newsletter/
├── notice/
├── page/
├── portfolio/
├── pricing/
├── product/
├── slider/
├── stats/
├── team/
├── template/
├── testimonial/
├── timeline/
└── utility/
Style variation JSON files:
styles/
├── amber.json
├── amethyst.json
├── arctic.json
├── ...
└── zinc.json
Each file contains a partial theme.json override defining the variation colors, typography, and other tokens.
Page templates as HTML block markup:
templates/
├── 404.html
├── archive.html
├── archive-product.html
├── author.html
├── blank.html
├── date.html
├── front-page.html
├── full-width.html
├── index.html
├── order-confirmation.html
├── page.html
├── page-cart.html
├── page-checkout.html
├── page-checkout-multi-step.html
├── page-my-account.html
├── page-no-title.html
├── page-wishlist.html
├── product-search-results.html
├── search.html
├── single.html
├── single-product.html
├── taxonomy-product_cat.html
└── taxonomy-product_tag.html
Test files:
tests/
├── bootstrap.php # Test initialization
├── unit/ # Unit tests
│ ├── Test_Assets.php
│ ├── Test_Blocks.php
│ └── Test_Helpers.php
└── integration/ # Integration tests
├── Test_Templates.php
├── Test_Patterns.php
└── Test_Hooks.php
| File | Purpose |
|---|---|
style.css |
Theme name, version, author, description (WordPress metadata header). No actual styles. |
theme.json |
Design tokens, block settings, layout dimensions, and style defaults. |
functions.php |
Loads autoloader and boots the main Aegis class. Minimal code. |
composer.json |
PHP dependencies, PSR-4 autoload mapping, scripts. |
package.json |
Node dependencies, npm scripts for building and testing. |
.wp-env.json |
Local development environment configuration (Docker, ports, plugins). |
webpack.config.js |
Build tool configuration extending @wordpress/scripts. |
phpcs.xml.dist |
PHP coding standards rules. |
phpunit.xml.dist |
PHPUnit test configuration. |
.editorconfig |
Editor indentation, encoding, and newline settings. |
The following directories are generated and excluded via .gitignore:
| Directory | Reason |
|---|---|
node_modules/ |
Installed Node packages (use npm install) |
vendor/ |
Installed PHP packages (use composer install) |
build/ |
Compiled assets (use npm run build) |
Note: Release packages DO include
vendor/andbuild/since users will not run build tools.
- architecture — How PHP classes are organized and loaded.
- building-assets — How source files become compiled assets.
- development-setup — Setting up the full directory structure.
- templates — How template files work.
Aegis version 1.0.0 | GitHub Repository | Report an Issue | Atmostfear Entertainment
License: GPL-2.0-or-later