enhancely / enhancely-for-typo3
Enhancely JSON-LD integration for TYPO3 - AI-generated structured data for SEO
Package info
github.com/dkd-dobberkau/enhancely-typo3
Type:typo3-cms-extension
pkg:composer/enhancely/enhancely-for-typo3
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.5.1
- typo3/cms-backend: ^13.0 || ^14.0
- typo3/cms-core: ^13.0 || ^14.0
- typo3/cms-fluid: ^13.0 || ^14.0
- typo3/cms-frontend: ^13.0 || ^14.0
Requires (Dev)
- dg/bypass-finals: ^1.9
- phpunit/phpunit: ^10.5 || ^11.0
README
AI-generated JSON-LD structured data for improved SEO and LLM visibility.
What is Enhancely?
Enhancely automatically generates Schema.org JSON-LD structured data for your web pages using AI. This helps search engines and AI platforms better understand your content, improving SEO and visibility.
Installation
Composer (recommended)
composer require enhancely/enhancely-for-typo3 vendor/bin/typo3 database:updateschema
In TYPO3 v12 (Classic Mode), activate the extension additionally via Admin Tools > Extensions.
Configuration
- Go to Admin Tools > Settings > Extension Configuration
- Select enhancely
- Configure:
| Setting | Description | Default |
|---|---|---|
| API Key | Your Enhancely API key from enhancely.ai | - |
| Enabled | Enable/disable JSON-LD generation | true |
| API Base URL | Base URL without path (leave empty for default) | https://api.enhancely.ai |
| Excluded Page Types | Comma-separated doktypes to skip (e.g., 404,403) |
- |
| Cache Lifetime | Cache duration in seconds | 86400 (24h) |
How It Works
Request → Middleware → Enhancely API → JSON-LD injected in <head>
- PSR-15 middleware intercepts frontend responses
- Calls Enhancely API with the page URL
- API returns AI-generated JSON-LD
- JSON-LD is injected before
</head> - ETags are cached to minimize API calls
Features
- Automatic JSON-LD: No manual schema markup required
- ETag Caching: Conditional requests minimize API usage
- TYPO3 Cache Integration: Uses native caching framework
- Graceful Degradation: Page renders normally if API fails
- URL Normalization: Strips query params and fragments for consistent caching
Backend integration
The extension ships a read-only Info-module tab that shows the Enhancely status for the currently selected page.
- In the TYPO3 backend, open Web › Info.
- Pick Enhancely JSON-LD from the function dropdown.
- The tab shows:
- Current Enhancely status (ready / processing / error / skipped)
- Last crawl timestamp, ETag, hash
- Sanity checks (BreadcrumbList absolute, title mismatch, crawl freshness, payload size)
- The raw JSON-LD payload
A Refresh button re-fetches from Enhancely and invalidates the shared cache for that URL. The tab does not trigger a server-side re-crawl on Enhancely — that endpoint is not exposed to customers.
Manual smoke test (for contributors)
- Install into a TYPO3 instance with the extension's API key configured.
- Open a page in the BE with known Enhancely data → expect green "ready" badge.
- Press Refresh → expect
Source: live (fresh)and an updated cached_at line. - Set an excluded doktype matching the page → expect gray "skipped".
- Blank the API key → expect amber "not configured" banner.
API Response Handling
| Status | Meaning | Action |
|---|---|---|
| 200 | JSON-LD ready | Inject and cache |
| 201/202 | Processing | Skip, retry on next request |
| 412 | Not modified | Use cached version |
Requirements
- TYPO3 12.4+, 13.x or 14.x
- PHP 8.2+
- Enhancely API key
Security
- The middleware reads the request URI (including the
Hostheader) and sends the normalized URL to the Enhancely API. Make sure$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern']is configured to prevent host-header injection / cache pollution. - The configured API Base URL must use
https://. Non-HTTPS values are silently rejected and the default endpoint is used instead, so the API key (sent as Bearer token) is never transmitted in cleartext. - API responses are capped at 1 MiB to prevent memory exhaustion.
- JSON-LD payloads are emitted with
JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT, so embedded HTML cannot break out of the surrounding<script type="application/ld+json">tag.
Development
# Install dependencies composer install # Run tests composer test
License
GPL-2.0-or-later. See LICENSE.