The new scroll-bookmark macro will allow you to add bookmarks with your custom IDs to the exported document.

Bookmarks are a great way to navigate to specific parts of large documents. It’s much easier than scrolling through the entire doc.

The bookmarks have to be defined in Confluence and are mapped to the export format as follows: The macro can be inserted anywhere in your content. If inserted into headings the bookmark will be placed at the document section for that heading. 

Please note

When placing a bookmark macro on a heading that is merged with the page title then the bookmark is not exported, for the following reasons:

  • The page title is typically not placed directly in front of the content. Depending on your template there might be multiple pages for TOC, legals, etc. between the document title and the start of the exported content.
  • The $scroll.title placeholder is typically considered as "text-only" and depending on the output format there is no consistent way of properly adding the bookmarks at that location.
  • Placing such bookmarks on the text following the heading in Confluence would separate the bookmark from its original source. To achieve this simply put the macro manually into the first paragraph after the heading.

Since this only happens for the very top page and top heading of the exported content, you could link to the document as a whole.

To insert a bookmark:

  1. Open the page you want to insert the bookmark to the page title and click Edit.
    The page is displayed in the Edit-Mode.
  2. Click on the position you want to insert the macro, enter '{scroll bookmark' and press Enter.
    The Insert 'Scroll Bookmark' Macro screen is displayed.
  3. Enter the Bookmark ID.
    (info) IDs must begin with a letter ([A-Za-z]) followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), and periods (".").
  4. Click Insert.
    The macro is inserted in the Confluence page.

When the page gets exported a bookmark is inserted with the defined ID in the defined place in the exported document

(info) Please note that the bookmarks might be hidden by default in the exported document.