a5b14048f4
- Rename project display name across 69 files (PHP, XML, INI, SQL, CSS, JS, JSON, MD) - Add <display-name> to .mokogitea/manifest.xml per moko-platform schema - Update pkg_mokoog.xml <name> to "Package - MokoJoomOpenGraph" (Joomla convention) - Update all update server URLs to new repo path - Add CONTRIBUTING.md and CODE_OF_CONDUCT.md (required by repo-health workflow) - Add .gitattributes for line-ending normalization and export-ignore rules - Add .gitignore Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
CLAUDE.md
This file provides guidance to Claude Code when working with this repository.
Project Overview
MokoJoomOpenGraph -- Open Graph, Twitter Card, and social sharing meta tag management for Joomla
| Field | Value |
|---|---|
| Platform | joomla |
| Language | PHP |
| Default branch | main |
| License | GPL-3.0-or-later |
| Wiki | MokoJoomOpenGraph Wiki |
| Standards | MokoStandards |
Common Commands
make build # Build the project
make lint # Run linters
make validate # Validate structure
make release # Full release pipeline
make minify # Minify CSS/JS assets
make clean # Clean build artifacts
composer install # Install PHP dependencies
Architecture
This is a Joomla package extension (pkg_mokoog) containing three sub-extensions:
com_mokoog (Component)
- Admin backend for viewing and managing all OG tag records
- Joomla 4/5 MVC:
Controller/DisplayController,Model/TagsModel,View/Tags/HtmlView,Table/TagTable - Namespace:
Joomla\Component\MokoOG\Administrator - Database table:
#__mokoog_tags— stores custom OG data per content item
plg_system_mokoog (System Plugin)
- Hooks
onBeforeCompileHeadto inject<meta property="og:*">and<meta name="twitter:*">tags - Auto-generates tags from article title, description, and images when no custom tags exist
- Supports articles (
com_content), menu items, and extensible content types - Namespace:
Joomla\Plugin\System\MokoOG
plg_content_mokoog (Content Plugin)
- Hooks
onContentPrepareFormto add OG fields tab to article and menu item editors - Hooks
onContentAfterSave/onContentAfterDeleteto persist/clean OG data - Namespace:
Joomla\Plugin\Content\MokoOG
Database Schema
Single table #__mokoog_tags:
content_type+content_id= unique key identifying any content itemog_title,og_description,og_image,og_type= custom OG overridespublishedflag for enabling/disabling per-item
Rules
- Never commit
.claude/,.mcp.json,TODO.md, or*.min.css/*.min.js - Attribution: use
Authored-by: Moko Consultingin commits - Branch strategy: develop on
dev, merge tomainfor release - Minification: handled at build time (CI)
- Wiki: documentation lives in the Gitea wiki, not in
docs/files - Standards: this repo follows MokoStandards
Coding Standards
- PHP 8.1+ minimum
- Joomla 4/5 DI container pattern:
services/provider.php→ Extension class - Legacy stub
.phpfile required for plugin loader but empty SubscriberInterfacefor event subscription (noton*method naming)bind() → check() → store()for Table operations (notsave())- Language file placement: site (no
folder) vs admin (folder="administrator") - SPDX license headers on all PHP files