Posts about Hippo CMS

Hosting a Vue.js App in Hippo CMS

April 19th 2019 Hippo CMS Vue.js Maven

Hippo CMS wasn't designed for web application development. While you could theoretically develop an application as a Hippo component, you would miss a lot of tooling that you are taking for granted today. As an alternative, you could develop a single page application (SPA) using any modern JavaScript framework and then serve the resulting static files (HTML, JS and CSS) from Hippo. In this post I will describe my configuration for developing an application in Vue.js.

Run Hippo Updater Scripts on Startup

April 12th 2019 Hippo CMS Maven

Once a Hippo CMS project is deployed to production for the first time, editors will start changing the content there. There's no easy way to merge those changes with the ones coming from developers. The official recommendation is to use Groovy updater scripts to do that when necessary. It's possible to automatically execute these scripts on startup, but this feature is almost completely undocumented.

Minifying Files in Hippo

In single page web applications (SPAs), it's a standard practice to minify the generated files (HTML, JavaScript and CSS) before publishing them. In contrast, Hippo CMS by default doesn't include such a step in its publishing process. However, there's nothing preventing you from adding it if you want to optimize the files that are sent to the browser.

Exclude a URL from Being Served by Hippo CMS

March 22nd 2019 Hippo CMS Java

In a Hippo CMS site, all URLs are under its control. Using the sitemap configuration, you can to some extent influence how URLs will map to content but there's no obvious or well-documented way to make Hippo CMS ignore the URL and let it be processed by a different servlet.

Escaping Interpolated Values in Hippo Templates

March 15th 2019 FreeMarker Hippo CMS

If untrusted values are not correctly escaped when included in web page markup, they can easily make the site susceptible to attacks. To reduce the risk of developer mistakes, many template engines can take care of escaping by default. FreeMarker template engine is no exception. Unfortunately, Hippo CMS default configuration doesn't enable automatic escaping in FreeMarker templates.

Freemarker Loop Variables in Translation Keys

November 2nd 2018 FreeMarker Hippo CMS

Freemarker, the Hippo CMS template language, includes special directives for working with sequences. Additional built-ins can be used to get more information about the loop variable. However, I've noticed that they don't always work.

What is a Valid Hippo Head Contribution?

October 26th 2018 Hippo CMS FreeMarker

In Hippo CMS, a page is generated from a hierarchy of Freemarker templates. Child contents can inject content into other parts of the root page using head contributions. In this post, I'm listing some restrictions which apply when using them.

Handling Empty POST Response in Hippo CRISP

October 19th 2018 Hippo CMS Java

One could argue that a JSON REST service should never return an empty body, but you might not always have a say in how a service you need to call will behave. Unfortunately, CRISP API in Hippo CMS throws a NullPointerException if the response body is empty.

Jackson ObjectMapper Config in Hippo CRISP

October 12th 2018 Hippo CMS Java Spring

The recommended way for integrating external services in Hippo CMS is the CRISP API. The official documentation provides detailed enough instructions for installing, configuring and using it. However, when I needed to customize the default Jackson ObjectMapper, it wasn't all that obvious how I could do it.

Initializing Log4j MDC in Hippo CMS

October 5th 2018 Hippo CMS Log4J Java Spring

In Log4j, Mapped Diagnostic Context (MDC) can be used to provide additional context information for every log message. In server applications it will usually be initialized for every request in a filter. In Hippo CMS, a custom valve must be injected into the request pipeline for that purpose.

Using JSONLayout for Log4j with Hippo CMS

September 28th 2018 Hippo CMS Log4J Maven

If you want to post-process the application logs, using the JSON format will usually make it easier. In Log4j, there's the JSON Layout available for that purpose. Making it work in Hippo CMS took me longer than expected.

Linking a Document to a Hippo Component

March 9th 2018 Hippo CMS Java

Most built-in components in Hippo CMS have a link to one or more documents as they are designed to render the CMS content documents. Sooner or later you'll want to achieve that with your own custom component as well.

Web Component Component for Hippo CMS

March 2nd 2018 Hippo CMS Web Components Java

As a part of getting acquainted with Hippo CMS I took on the task of creating a custom Hippo component for including a Stencil web component in a portal page using the CMS editor. I based my work on a similar component I found on GitHub for a Polymer web component.