The Documentation theme is one of the themes bundled with Confluence.

The Documentation theme is designed for spaces containing technical documentation, but you may find it useful for other types of structured content. It provides a table of contents for your space, a configurable header and footer, and text styles suited to documentation. (See features below.)

Quick guide to applying and customising the Documentation theme:

  • Choose Themes.
  • Select Documentation Theme and choose Confirm.
  • If you want to customise the theme, choose Configure theme.
    • Select or deselect the default page tree.
    • Select or deselect the space-restricted search.
    • Enter the text and wiki markup for your custom left-hand panel header and footer.
    • Choose Save.

The rest of this page gives more details of the above procedure.

On this page:

Related pages:

Screenshot: The Documentation theme showing the space sidebar replaced by a navigation sidebar.

Applying the Documentation theme to your space

Follow the steps below to apply the Documentation theme to your space. All pages in the space will start using the theme immediately.

To apply a theme to a space:


  1. Choose Themes and select a theme option
  2. Choose Confirm

    Screenshot: Applying a theme

If your space is using the Documentation theme:

  1. Choose Themes from the space administration options
  2. Select a theme option
  3. Choose Confirm

Applying the Documentation theme to your site

If you have site administrator permissions, you can apply the theme at site level. It will then be the default theme for all spaces in the site. See the administrator's guide to applying a theme.

Customising the Documentation theme

The theme works well without any customisation. If necessary, you can restrict the search to just one space, change the content of the left-hand navigation panel and add your own header and footer. The following instructions assume you have already applied the Documentation theme.

To customise the Documentation theme:

  1. Choose Themes in the left-hand panel under the heading 'Look and Feel'.
  2. Choose Configure theme in the yellow area of the 'Current Theme' section at the top of the page. See screenshot below. The 'Documentation Theme Configuration' screen appears. See screenshot below.
  3. Select or deselect the Page Tree check box. This determines whether your space will display the default search box and table of contents (page tree) in the left-hand panel.
  4. Select or deselect the Limit search results to the current space check box.
  5. Enter text, images, macros and other wiki markup into any or all of the three text boxes.
    (info) You can use the Include or Excerpt Include to include re-usable content into your footer. See hint below.
  6. Choose Save.

Screenshot: The 'Configure theme' option



Screenshot: Customising the Documentation theme


Customising the theme at site level

If you have site administrator permissions, you can apply and customise the theme at site level. The customisation options are the same as the space level options, as described above.

Features of the Documentation theme

Screenshot: A customised header, footer and left-hand panel


The above screenshot shows a wiki space with a customised left-hand panel, header and footer.

Here is a summary of the features that the Documentation theme provides:

 

Hints and tips

Hiding pages from the left-hand table of contents

You can 'hide' pages by putting them at the same level as or higher than the space home page.

Each space has a single page designated as the 'Home' page. You can specify the home page in the space administration section.

The theme constructs the page tree in the left-hand panel from all pages that are child pages of the space’s home page.

If your documentation pages are at the same level as the space home page, they will not appear in the left-hand navigation bar. So you can 'hide' pages by putting them at the same level as or higher than the space home page. The pages will show up in the search results and people can see the content if they open the page, but the pages will not appear in the left-hand panel.

More detail: The theme uses the Pagetree macro to produce the table of contents. When entering the Pagetree macro, you can choose the top page in the page tree. The Documentation theme chooses the space home page as the top page.

Using reusable content in your header, footer or sidebar

You can use any text or wiki markup in your theme header, footer or left-hand panel. One useful hint is to use the Include or Excerpt Include to include re-usable content into your footer.

The screenshot above shows the theme customisation options, with examples of the macros used to include content from other pages. And the example screenshot also above shows the resulting header, footer and left-hand panel.

Adding content below the page tree in your sidebar

If you want to include your own content underneath the page tree, you can deselect the 'Page Tree' check box, add your own page tree using the Pagetree macro in the 'Navigation' text box, and then add your own content under the macro.

The screenshot above shows the theme customisation options, with the default page tree deselected and a custom page tree inserted, along with additional content in the left-hand panel. The example screenshot also above shows the resulting left-hand panel.

Adding an expanding All Versions section to the sidebar

If you want to include a an expanding list of links to other spaces, as we have included in this space (see 'Docs for all Confluence releases' in the sidebar), you can use an Expand Macro and an Include Page Macro in the 'Navigation' text box.   For example:

*[Docs for all Confluence releases|_Latest Versions of Confluence Documentation]*
{expand:Choose a version...}
{include:_Latest Versions of Confluence Documentation}
{expand}

If you would like this to display below the page tree, follow the steps above.

Adding underlines to your links

By default, the Documentation theme does not underline hyperlinks. If you prefer to have your links underlined, you can edit the CSS stylesheet for your space and add the following CSS code:

.wiki-content a:link, .wiki-content a:visited, .wiki-content a:active {
  text-decoration: underline;
}

Jumping to the same page in another space

The {spacejump} macro is provided along with the Documentation theme. You can use space jumping to link from a page in one wiki space to a page with the same name in another space, without knowing the name of the page when you create the link. When a reader is viewing a page and chooses the link provided by the macro, they will go to a page with the same name, but in the space specified in the macro. See more about the Space Jump macro.

Hiding the left-hand panel completely

It's not possible to remove the left-hand panel entirely, using the user interface supplied by the theme. There is an improvement request here: If you like, you can comment on and/or vote for that request. In the meantime, Atlassian Answers is a good place to ask the question and see if other people can help you with custom code to remove the panel.

Notes