leungd / tatami
Base theme for ULM
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
Type:wordpress-theme
pkg:composer/leungd/tatami
Requires
- timber/timber: ^2.1
This package is auto-updated.
Last update: 2026-02-04 02:04:59 UTC
README
A foundational WordPress starter theme built with modern development tools.
Features
- Timber/Twig - Template engine for clean, maintainable templates
- Vite - Fast development server and optimized production builds
- Tailwind CSS 4 - Utility-first CSS framework with typography plugin
- Modern JavaScript - ES modules support with Vite
Requirements
- PHP 8.0+
- WordPress 5.0+
- Composer
- Node.js & pnpm
Installation
- Clone or copy this theme into your WordPress themes directory
- Install PHP dependencies:
composer install - Install JavaScript dependencies:
pnpm install
Development
Start the Vite development server:
pnpm dev
Build for production:
pnpm build
Lint JavaScript:
pnpm lint
Format code:
pnpm format
Configuration
Tailwind
Tailwind 4 uses CSS-based configuration. Customize the theme in src/css/tailwind.css using @theme directives. Brand colors, spacing, and other design tokens are configured directly in the CSS file.
Fluid Grid System
The theme includes a 12-column fluid grid system (.fluid-grid) with named grid lines for flexible layout control:
<div class="fluid-grid"> <div class="col-[content-start/content-end]">Full content width</div> <div class="col-[col-3/col-10]">Custom column span</div> <div class="col-[full-start/full-end]">Full bleed</div> </div>
Helper classes: .span-content, .span-md, .span-lg, .span-xl, .span-full
Vite Integration
Vite is integrated via a custom WordPress plugin in vite.config.js that:
- Writes a
build/hotfile when the dev server is running - Cleans up the hot file on server stop
- Triggers full-page reload on
.phpand.twigfile changes
The lib/Vite.lib.php class provides asset(), css(), img(), and enqueue_module() methods for resolving Vite-built assets in WordPress.
Theme Files
Core PHP Files
functions.php- Main theme setuplib/Tatami.lib.php- Theme functionality, Timber context, and custom functionslib/Theme.lib.php- Asset enqueueinglib/Vite.lib.php- Vite integration for WordPress
Template Files (Twig)
views/base.twig- Base template with HTML structureviews/page.twig- Default page templateviews/single.twig- Single post templateviews/archive.twig- Archive/blog templateviews/search.twig- Search results templateviews/404.twig- 404 error templateviews/header.twig- Site headerviews/footer.twig- Site footerviews/partials/menu.twig- Menu component with dropdownsviews/partials/- Reusable template partials
Customization
Adding Custom Post Types
Add your custom post types in the register_post_types() method in lib/Tatami.lib.php.
Adding Custom Taxonomies
Add your custom taxonomies in the register_taxonomies() method in lib/Tatami.lib.php.
Timber Context
Modify the global Timber context in the add_to_context() method in lib/Tatami.lib.php. This is where you can add site-wide variables accessible in all Twig templates.
Custom Twig Filters
Add custom Twig filters in the add_to_twig() method in lib/Tatami.lib.php.
Theme Options
This theme is designed to work with ACF (Advanced Custom Fields) options pages. Configured options are available in Twig templates via {{ options }}. ACF is optional — the theme gracefully handles its absence.
Assets
Styles
Main stylesheet: src/css/tailwind.css
Scripts
Main JavaScript: src/js/main.js
License
This theme is licensed under the terms specified in the LICENSE file.