Breadcrumbs

Use Page Properties in Scroll HTML Templates for SEO

For search engine optimization there is a handy way to use the built-in Page Properties macro to define SEO data and output it in a template.

This recipe describes how to do that.

Create Page Properties on a Page

Edit the page and create a page properties macro and create the SEO properties (checkout the official documentation for more info how to create properties).

Add the Content Properties

In your custom template access the page properties with the $pageProperty placeholder like this:

include-htmlhead.vm
:
<title>$pageProperty.from("seo.pagetitle")</title>
<meta name="description" content="$pageProperty.from("seo.description")">
:

If you are using the default WebHelp theme, you can add SEO to it with the steps below:

  1. Download the source of the WebHelp theme from our Bitbucket: 

  2. Unzip the archive, navigate to /src/main/resources/com/k15t/scroll/scroll-webhelp-theme/scroll-html/include

  3. Open include-htmlhead.vm with a text editor and add the code above

  4. Save the file

  5. Continue from "Installing the new Plugin" section on the page: Creating a Template

  6. Upload the template to Confluence as a regular add-on