Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The Docs AddOn allows you to embed HTML, JavaScript, and CSS-based content in Confluence Cloud. The initial idea came from embedding JavaDocs. However, as JavaDocs is just HTML, JavaScript, and CSS, you can use the AddOn for embedding any type of such content.
Screens
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.
Here is a code snippet showing how to use curl to upload a doc to the AddOn:
Code Block |
---|
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.:
View file | ||
---|---|---|
|
Docs Configurations
Here you find a list of all configurations in a addition to a description and example values.
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 *.{jar,zip} |
Label | Filter by attachments labels. |
Panelinfo | ||||||
---|---|---|---|---|---|---|
| ||||||
sadfasdfQuick Links |
Table of Contents
Table of Contents | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|