This is the documentation for an older version of Scroll Viewport. Here you can view the most up-to-date version of the Scroll Viewport documentation.

Using a sitemap.xml file

A sitemap is a XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site, for example. This allows search engines to crawl the site more intelligently.

You can automatically generate a sitemap with the HTML/Velocity template below. Save that as sitemap.xml.vm

#set($PAGE_FILTER = [
*##macro(processChildren $page)#*
    *##if (!$PAGE_FILTER.contains($page.title))#*
    #foreach($child in $page.children)#*
*#<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="">

To make the sitemap available, you have to create a sitemap.xml page in your space with the following page properties.



Google will look for this sitemap.xml in your root folder - e.g.:

Currently this file can not be accessed if a Viewport is configured to use the path prefix '/' even if they are available in the Confluence directory.

Workaround 1:

  1. Set up a reverse proxy in front of Confluence (Apache, Nginx, ...)
  2. Configure it to serve requests to sitemap.xml itself instead of forwarding it to Confluence.

Workaround 2:

  1. In the space for the viewport for "/" create a new page called sitemap.xml as child of the home page
  2. In your theme's page.vm template make sure that when this page is rendered only the content of the file without any HTML tags rendered.
    • You can either add the sitemap.xml contents to your template or take it from the Confluence page.
  3. If your template has a page tree you'll want to adapt it so it filters out pages called robots.txt