Docs (Cloud)

The Docs AddOn in Confluence Cloud empowers users to seamlessly integrate HTML, JavaScript, and CSS-based content. Its inception was inspired by the embedding of JavaDocs. However, given that JavaDocs essentially comprise HTML, JavaScript, and CSS, the AddOn's versatility extends beyond this initial concept. This means you can utilize the AddOn to embed a wide range of similar content types, including but not limited to Doxygen, PHPDocs, and more. Whether it's Doxygen, PHPDocs, or other content-sharing technologies, the AddOn offers a flexible solution for integrating various types of content within Confluence Cloud.

Keywords: JavaDoc, Doxygen, PHPDoc, Static WebContent, Technical Documentation

 

Here you can find a Docs Demo.

Screens

Docs Overview

 

Upload Dialog
Organized as Attachments

 

Show JavaDoc (embedded)

 

Show JavaDoc (new tab)

 

Configuration Page

 

Welcome / no content

 

Edit Dialog

 

 

 

Feature Clips

Upload via API
Open Doc in Tab
Manual Upload

 

Sorting

 

Edit title/filename

 

 

 

Automation via REST API

All your Docs are organized as attachments on a Confluence Page basis. So, you can simply use Confluence’s standard REST API to organize attachments to add, delete, or modify your content.

You can find a real example in our Feature Clips above.

Here is a code snippet showing how to use curl to upload a doc to the AddOn:

curl -D- \ -u user:password \ -X PUT \ -H 'X-Atlassian-Token: nocheck' \ -F 'file=@"my-javadoc.jar"' \ -F 'minorEdit="true"' \ -F 'comment="My JavaDoc"; type=application/zip' \ http://myhost/rest/api/content/123/child/attachment

Here is the link to Confluence Cloud’s REST API documentation for attachment handling:
https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put

Docs File Structure

The Docs AddOn requires all content to be packaged in a ZIP archive. By default, the entry page should be called index.html and must be located at the root of the ZIP archive.

Note: The name of the entry page can be adjusted in the AddOn’s configurations.

Example File

Here is an example file showing how a document should be organized:

Docs Configurations

Screen: Docs Configurations

Here you find a list of all configurations in addition to a description and example values.

 

Description

Example

 

Description

Example

Height

The Docs AddOn’s static height in pixel on the page. Default: 600 pixel.

600

Entry Page

The main entry page of your Docs content. Default: index.html.

index.html

Filename Pattern

Filter your attachments by filename using a Java NIO Glob expression.

  • *.jar - Matches all files that has extension as jar.

  • *.{jar,zip} - Matches all files that has extension as jar or zip. { } are used to group patterns and , comma is used to separate patterns.

  • ?.zip - Matches all files that has any single charcter as name and extension as zip.

  • *.* - Matches all files that has . in its name.

  • [xyz].jar - Matches a file name with single character ‘x’ or ‘y’ or ‘z’ and extension as jar. Square brackets [ ] are used to sepcify a character set.

  • [a-c].jar - Matches a file name with single character ‘a’ or ‘b’ or ‘c’ and extension as jar. Hypehen – is used to specify a range and used in [ ]

  • [!a].zip - Matches a file name with single character that is not ‘a’. ! is used for negation.

(Source: https://javapapers.com/java/glob-with-java-nio/)

*.jar

*.{jar,zip}

Label

Filter by attachments labels.

 

 

 

How To’s

Clear Cache

To clear the cache, please click on “clear“ on the lower right on your overview page:

Clear Cache