Magnolia CMS x enhancely: AI ready in 5 minutes
Two Integration Options
- 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
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
- 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
<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]
Light Module Installation
Light Module Step 1. Create REST Client Configuration
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}"}'
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
- 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.
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.
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
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
Full docs: docs.enhancely.ai
GitHub: https://github.com/enhancely/