kirby CMS x enhancely: enhance your website in a couple of minutes for AI readiness

Kirby is a flat-file content management system built with PHP. Originally released in 2009, it stores all content in text files and folders rather than in a database. This file-based architecture means there are no database queries on page load, no database configuration required during setup, and no SQL-related security vulnerabilities to manage.

The content structure in Kirby maps directly to the folder hierarchy on the server. Each folder represents a page, and content is stored in plain text files using formats like Markdown and YAML. This approach makes content portable, easy to version control with Git, and straightforward to deploy – uploading files to a PHP server is all that's required. For projects that need database functionality, Kirby can optionally connect to MySQL or external data sources like APIs and spreadsheets.

Kirby includes an optional admin panel built on Vue.js, which allows content teams to edit pages, manage files, and configure settings through a web interface. Developers define custom content structures using blueprints, giving each page type exactly the fields it needs. The system follows an MVC-like architecture with templates, controllers, and a routing system that can be extended through plugins and hooks.

The CMS can also operate in headless mode, delivering content via API to single-page applications, mobile apps, or other frontends. This flexibility makes Kirby suitable for traditional websites as well as decoupled architectures where content needs to be consumed by different platforms.

With enhancely, your Kirby site becomes instantly readable for AI systems like ChatGPT, Perplexity, and Google AI Overviews. The plugin generates rich JSON-LD structured data automatically, without touching your existing content.

Get Started

  1. Create your enhancely account and get your API key
  2. Install the plugin via Composer
  3. Add your API key to the config
  4. Add <?= enhancely() ?> to your templates
  5. Done – your Kirby site is now AI-ready

How It Works

  • enhancely analyzes your page content via API when a visitor requests a page
  • JSON-LD is generated based on your actual content – no hallucinations, no made-up data
  • Kirby's built-in cache stores the response, so subsequent requests are instant
  • Cache invalidates automatically when you update content in the Panel
how enhancely easily integrates into kirby using the enhancely kirby plugin
how enhancely easily integrates into kirby using the enhancely kirby plugin

Installation

Via Composer (recommended)

    composer require enhancely/kirby-enhancely
  

Via Git Submodule

    git submodule add https://github.com/enhancely/kirby-enhancely.git site/plugins/kirby-enhancely
  

Manual Installation

Download and unzip into site/plugins/kirby-enhancely

Configuration

Add your API key in site/config/config.php:

    return [
    'enhancely.apiKey' => 'your-api-key-for-example-com'
];
  

Or use environment variables (recommended for production):

Create a .env file in your Kirby root:

    ENHANCELY_API_KEY=your-api-key-for-example-com
  

The plugin auto-loads from .env – no additional config needed.

Security Tip: Add .env to your .gitignore and never commit API keys to version control.

Usage

Add one line to your template's <head> section:

    <?= enhancely() ?>
  

That's it. Seriously.

The function outputs a complete <script type="application/ld+json"> block with your page's structured data.

Example: snippets/header.php

    <!DOCTYPE html>
<html lang="<?= $kirby->language() ?? 'en' ?>">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= $page->title() ?></title>

    <?= enhancely() ?>

    <?= css('assets/css/main.css') ?>
</head>
  

Caching Included

The plugin handles caching automatically:

  • ETag-aware: Only fetches new data when content actually changed
  • Uses Kirby's native cache: No additional cache layer needed
  • Auto-invalidation: Cache clears when pages are updated in the Panel

Cache Configuration

    return [
    'enhancely.apiKey' => 'your-api-key',
    'enhancely.expire' => 60  // Cache duration in minutes (0 = infinite)
];
  

Works With Existing Markup

Already have JSON-LD on your site? No problem.

Search engines automatically merge multiple JSON-LD blocks. enhancely adds additional structured data without conflicting with your existing schema markup.

Compatibility & Requirements

  • PHP 8.2 or higher
  • Kirby 4.x or 5.x
  • enhancely account with API key for your domain

Learn More