×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Customize RSS feed for blog posts

Thomas Walker

Thomas Walker Last update: Oct 17, 2017

If you enable blog posts in your viewport, your viewport creates an RSS newsfeed that the readers of your blog can subscribe to. The feed is in the Atom Syndication Format and its URL is <your-viewport-url>/atom.xml.

Info

There is no setting to stop Viewport from generating the RSS feed.

Customizing the RSS feed

Because feed entries are rendered using the viewport template, you can customize your RSS feed entries' content and summary fields using template files in your Scroll Viewport theme.

The template for the content must be named blog-feed.vm and the template for the summary must be called blog-summary-feed.vm. They must be located in the root directory of your theme. The content field usually either contains or links to the blog post in question and the summary field is intended for a short abstract or excerpt of the post.

Template code examples 

To output the entire blog post in the RSS content field, use the following code in the blog-feed.vm template:

blog-feed.vm

$page.content

If you use the following code in the blog-summary-feed.vm file:

blog-summary-feed.vm

#set($excerptHtml = $page.excerptAsHtml)
#if($excerptHtml)
    $excerptHtml
#else
    $page.getDescription(150)
#end

the summary field will contain the excerpt of the blog post (if it has one), otherwise the first 150 characters of the post's text.

You can customize the title of the feed by placing a page property named "viewportFeedTitle" on the home page of the space. Scroll Viewport will then use the content of that page property as the feed title.

RSS newsfeed features

  • RSS feed dates are based on the blog post's original publishing date instead of its last modification date. This means RSS readers won't suddenly display an old post at the top where someone recently fixed a typo.
  • The feed is always rendered as seen by an anonymous (logged-out) user, so it will never contain any restricted blog posts, regardless of whether you're logged into Confluence or not.
2xlatest
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok