1
Development
Jonathan Miller edited this page 2026-05-16 22:37:10 +00:00

Development

Prerequisites

  • PHP 8.1+
  • Composer
  • GNU Make
  • A Joomla 5.x installation for testing

Setup

git clone https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero.git
cd MokoJoomHero
composer install

Available Make Targets

Command Description
make help Show all available targets
make build Lint, validate, and package into a ZIP
make lint PHP syntax check on all files in src/
make phpcs Run PHP CodeSniffer (Joomla standard)
make phpcbf Auto-fix coding standard violations
make validate Run lint + phpcs
make clean Remove build/ and dist/
make dev-install Symlink src/ into a local Joomla installation
make release Full pipeline: validate + test + build

Project Structure

MokoJoomHero/
+-- src/                        # Template source (packaged into ZIP)
|   +-- templateDetails.xml     # Joomla manifest
|   +-- index.php               # Main template
|   +-- error.php               # Error page
|   +-- offline.php             # Offline page
|   +-- component.php           # Component-only output
|   +-- joomla.asset.json       # Web Asset Manager config
|   +-- css/template.css        # Stylesheet
|   +-- js/template.js          # JavaScript
|   +-- language/en-GB/         # Language files
|   +-- html/                   # Template overrides
|   +-- images/                 # Template images
+-- .gitea/                     # CI workflows and issue templates
+-- Makefile                    # Build automation
+-- composer.json               # PHP dev dependencies
+-- phpstan.neon                # Static analysis config
+-- update.xml / updates.xml    # Joomla update server manifests
+-- CHANGELOG.md                # Release history

Web Asset Manager

Assets are declared in src/joomla.asset.json. The template registers a preset called template.tpl_mokojoomhero which loads both CSS and JS.

Template Overrides

Place Joomla component/module output overrides in src/html/:

src/html/com_content/article/default.php
src/html/mod_menu/default.php

Branch Strategy

  • dev -- active development
  • main -- stable releases (merge via PR only)
  • Tags: v1.0.0, v1.1.0, etc.

CI/CD

Gitea Actions workflows in .gitea/workflows/ handle:

  • PHP linting and CodeSniffer on PRs
  • Automated release packaging
  • Update server XML management
  • Security scanning (gitleaks)