Magnolia CMS x enhancely: AI ready in 5 minutes

Magnolia is an enterprise-grade, Java-based content management system known for its flexibility and powerful authoring capabilities. Founded in 2003 in Basel, Switzerland, Magnolia powers websites for leading global brands with its intuitive page editor, multi-site management, and seamless integrations.
What distinguishes Magnolia within the enterprise CMS category is its visual page editor. Content teams can assemble pages using drag-and-drop components, preview changes across devices, and manage content workflows with role-based permissions. This visual editing capability addresses a common challenge in enterprise environments, where editors need direct control over page layouts without developer assistance.
Magnolia's architecture supports both traditional server-side rendering with FreeMarker templates and modern headless delivery via its REST API. The Light Module concept allows rapid development without Java deployments—configuration, templates, and REST clients can be added as simple file-system resources that are hot-deployed automatically.
The system includes integrated Digital Asset Management, multi-language support with translation workflows, and the Password Manager for secure credential storage. The templating system uses FreeMarker with built-in functions for content access, site configuration, and REST client calls.
The enhancely integration connects to Magnolia-powered websites and automates the generation of structured data. It creates page-specific JSON-LD markup that helps search engines and AI systems interpret your content accurately—without requiring manual markup or additional development effort.
enhancely automatically injects the right JSON-LD (schema.org) for each Magnolia page—no manual markup, no brittle scripts.

Two Integration Options

Choose the approach that best fits your Magnolia setup:
  • Java Module (recommended for production): Full-featured integration with in-memory caching, ETag support, and Config App configuration
  • Light Module (quick setup): No Java code required—just YAML configuration and FreeMarker templates
Both options support secure API key storage via Magnolia's Password Manager.

How It Works

  • FreeMarker template sends the current page URL to the enhancely API
  • enhancely analyzes your page and returns ready-made JSON-LD
  • Template injects it as <script type="application/ld+json"> in HTML head
  • Built-in caching prevents repeated API fetches (Java Module)
  • ETag support enables efficient revalidation without data transfer
  • Only runs on public instance—author instance remains unchanged

Java Module Installation

Java Module Step 1. Add Maven Dependency

    <dependency>
    <groupId>de.neoreply.magnolia</groupId>
    <artifactId>enhancely-magnolia-module</artifactId>
    <version>1.0.0</version>
</dependency>
  

Java Module Step 2. Configure API Key

Store your API key securely. Configuration priority:
  • Password Manager (recommended): Create entry named enhancely-api-key
  • Config App: Set in /modules/enhancely-magnolia-module/config
  • Environment variable: Set ENHANCELY_API_KEY

Java Module Step 3. Add to FreeMarker Template

Add JSON-LD injection to your page's <head> section:
    [#if cmsfn.publicInstance]
    [#assign pageUrl = ctx.aggregationState.originalBrowserURL!ctx.request.requestURL?string /]

    [#if pageUrl?has_content]
        [#assign jsonLd = enhancelyaifn.getJsonLd(pageUrl)!"" /]
        [#if jsonLd?has_content]
<script type="application/ld+json">
${jsonLd}
</script>
        [/#if]
    [/#if]
[/#if]
  
That's it. The module handles caching, error handling, and API communication automatically.
Magnolia CMS integration with enhancely as a java module (Rest Client)
Magnolia CMS integration with enhancely as a java module (Rest Client)

Light Module Installation

Light Module Step 1. Create REST Client Configuration

Create light-modules/your-module/restClients/enhancely.yaml:
    baseUrl: https://app.enhancely.ai

restCalls:
  generateJsonLd:
    method: post
    path: /api/v1/jsonld
    entityClass: com.fasterxml.jackson.databind.JsonNode
    headers:
      Authorization: "Bearer {@password:your-password-manager-uuid}"
      Accept: "application/ld+json"
      Content-Type: "application/json"
    body: '{"url": "{url}"}'
  
Replace your-password-manager-uuid with your Password Manager entry UUID.

Light Module Step 2. Add to FreeMarker Template

    [#if cmsfn.publicInstance]
  [#assign pageUrl = ctx.aggregationState.originalBrowserURL!ctx.request.requestURL?string /]

  [#if pageUrl?has_content]
    [#attempt]
      [#assign jsonLdResponse = restfn.callForResponse("enhancely", "generateJsonLd", {"url": pageUrl}) /]
      [#if jsonLdResponse??]
        [#assign statusCode = jsonLdResponse.getStatus() /]

        [#switch statusCode]
          [#case 200]
            [#assign jsonLd = jsonLdResponse.getEntity() /]
            [#if jsonLd?has_content]
              <script type="application/ld+json">
                ${jsonLd}
              </script>
            [/#if]
            [#break]
          [#case 201]
            <!-- Enhancely: URL queued for processing -->
            [#break]
          [#case 202]
            <!-- Enhancely: URL being processed -->
            [#break]
          [#case 429]
            <!-- Enhancely: Rate limit reached -->
            [#break]
        [/#switch]
      [/#if]
    [#recover]
      <!-- Enhancely: API request failed -->
    [/#attempt]
  [/#if]
[/#if]
  

Caching Included

The Java Module includes built-in caching:
  • ETag-aware caching (reduces API calls; keeps schema fresh)
  • 7-day default TTL—configurable via Config App
  • Graceful fallback—serves cached content on API errors or rate limiting
  • In-memory cache—no external dependencies required

Compatibility & Requirements

  • Magnolia >= 6.2
  • Java >= 11
  • FreeMarker Templates
  • Light Modules supported

Freshly served by Neo Reply

This Magnolia integration was developed by Neo Reply, a Digital Experience Platform (DXP) specialist within the Reply Group. As a brand-new yet highly motivated Magnolia partner, Neo Reply brings a remarkable footprint in the DXP field—with decades of hands-on experience in enterprise content management, AI-powered personalization, search technologies, and e-commerce integrations.

Their deep understanding of enterprise CMS architectures and integration patterns made them the ideal partner to bring enhancely's structured data capabilities to the Magnolia platform.
The enhancely Magnolia module is available free of charge on the official Magnolia Marketplace.

What they say

It's remarkable how quickly Neo Reply understood, embraced, and executed the integration challenge. Enabling the enhancely integration through two different approaches showcases both the flexibility of Magnolia CMS regarding integrations and extensions, and Neo Reply's high level of expertise and understanding of the business case. The module is available free of charge on the official Magnolia Marketplace. Many thanks for the outstanding support and for making it possible to deliver schema information in gourmet quality at fast-food speed in Magnolia scenarios.

Bastian Sirvend, Founder, enhancely.ai
When enhancely approached us with their vision for automated structured data generation, we immediately recognized the value for enterprise content teams. Magnolia's extensible architecture—from Light Modules to full Java integrations—gave us the flexibility to create a solution that fits any project setup. We're proud to contribute this module to the Magnolia community and excited to see how it helps organizations improve their AI search visibility.

Dr. Raphael Richter, Managing Director, Neo Reply

Neo Reply logo
this enhancely integration has been freshly served by Neo Reply

About Neo Reply

Neo Reply is the Digital Experience Platform specialist within the Reply Group. Together with their clients, they develop tailored DXP strategies and solutions—from conception and planning through architecture to successful frontend and backend implementation.

Learn more at neoreply.de

Learn More

Get it

Get the code for magnolia x enhancely integration

magnolia marketplace