Documentation contents¶
Installing¶
Atlassian Confluence Builder for Sphinx 2.5.1 depends on:
Python 3.8+
Requests 2.14.0 or later
Sphinx 6.1+
Confluence Cloud or Server 7.18+
The recommended method of installing or upgrading is using pip:
pip install -U sphinxcontrib-confluencebuilder
(or)
python -m pip install -U sphinxcontrib-confluencebuilder
To verify the package has been installed, the following command can be used:
python -m sphinxcontrib.confluencebuilder --version
For new users, the following provides a series of steps to assist in preparing a new environment to use this package. For users wishing to use virtualenv, please see the instructions in Installing (virtualenv).
Note
If the installation process fails with the following error “AttributeError: ‘_NamespacePath’ object has no attribute ‘sort’”, try upgrading the setuptools module:
pip install -U setuptools
(or)
python -m pip install -U setuptools
Linux¶
While the use of Python/pip is almost consistent between Linux distributions, the following are a series of helpful steps to install this package under specific distributions of Linux. From a terminal, invoke the following commands:
Arch¶
$ sudo pacman -Sy
$ sudo pacman -S python-pip
$ pip install sphinxcontrib-confluencebuilder
$ python -m sphinxcontrib.confluencebuilder --version
sphinxcontrib.confluencebuilder <version>
CentOS¶
$ sudo yum install epel-release
$ sudo yum install python-pip
$ pip install sphinxcontrib-confluencebuilder
$ python -m sphinxcontrib.confluencebuilder --version
sphinxcontrib.confluencebuilder <version>
Fedora¶
$ sudo dnf install python-pip
$ pip install sphinxcontrib-confluencebuilder
$ python -m sphinxcontrib.confluencebuilder --version
sphinxcontrib.confluencebuilder <version>
Ubuntu¶
$ sudo apt-get update
$ sudo apt-get install python-pip
$ pip install sphinxcontrib-confluencebuilder
$ python -m sphinxcontrib.confluencebuilder --version
sphinxcontrib.confluencebuilder <version>
OS X¶
From a terminal, invoke the following commands:
$ sudo easy_install pip
$ pip install sphinxcontrib-confluencebuilder
$ python -m sphinxcontrib.confluencebuilder --version
sphinxcontrib.confluencebuilder <version>
Windows¶
If not already installed, download the most recent version of Python:
Python - Downloads
When invoking the installer, it is recommended to select the option to “Add Python to PATH”; however, users can explicitly invoked Python from an absolute path. The remainder of these steps will assume Python is available in the path.
Open a Windows command prompt. Invoke the following:
> python -m pip install sphinxcontrib-confluencebuilder
> python -m sphinxcontrib.confluencebuilder --version
sphinxcontrib.confluencebuilder <version>
Development installation¶
To install the bleeding edge sources, the following pip command can be used:
pip install git+https://github.com/sphinx-contrib/confluencebuilder.git
Tutorial¶
Note
Advanced users of Sphinx can skip this section and view configuration options available to prepare their documentation.
After installing Atlassian Confluence Builder for Sphinx, a Sphinx project can be configured to use supported builders. The following tutorial will provide a series of steps which will:
Enables a user to generate Confluence-compatible markup documentation.
Enables a user to publish to a Confluence instance.
New documentation¶
If a user is starting a new Sphinx-based documentation, the following steps can be used to create a new minimalistic Sphinx configuration or use Sphinx’s quick-start utility. If attempting to use this extension for existing documentation, start configuring for this extension.
Quick-start¶
If opting for the quick-start utility, open a terminal to the location where documentation should be generated (typically, an empty directory) and invoke the following:
sphinx-quickstart
(or)
python -m sphinx.cmd.quickstart
(or)
python -m sphinx.quickstart
After completing the quick-start, conf.py
can be tweaked as desired.
Continue preparing the documentation by
configuring for this extension.
Minimalistic¶
For a minimalistic setup, create a new folder for the new documentation and
configuration to be used. This is done by first creating a document named
index.rst
with the following content:
My documentation
================
This is a test document.
Next, create a configuration file conf.py
with the following information:
extensions = []
After preparing these files, continue by configuring for this extension as follows.
Configuring to use this extension¶
Enable this extension by registering the extension in the target project’s
Sphinx configuration (conf.py
):
extensions = [
'sphinxcontrib.confluencebuilder',
]
Next, include a series of publish-related settings to the configuration file:
confluence_publish = True
confluence_space_key = 'TEST'
confluence_ask_password = True
# (for Confluence Cloud)
confluence_server_url = 'https://example.atlassian.net/wiki/'
confluence_server_user = 'myawesomeuser@example.com'
# (or, for Confluence Server)
confluence_server_url = 'https://intranet-wiki.example.com/'
confluence_server_user = 'myawesomeuser'
Make appropriate changes to the above configuration for the environment being targeted.
Note
The configuration of the space key (confluence_space_key
) is
case-sensitive. Ensure the value matches the case found on the Confluence
instances (typically, uppercase).
Recommended configurations¶
By default, this extension will publish any documents to the root of a
configured space. It can be common for most users to want to publish a
documentation set as children of an already existing page. To take advantage of
this feature, a user will want to define a confluence_parent_page
option in
their configuration file. For example:
confluence_parent_page = 'MyDocumentation'
When publishing a documentation set, the above configuration will tell this
extension to publish all documents under the MyDocumentation
page.
For first time users, they may wish to sanity check what content will be
published before publishing for the first time to a Confluence instance. A user
can perform a dryrun by configuring the confluence_publish_dryrun
option in
the project’s configuration file. For example:
confluence_publish_dryrun = True
For more information on the above or additional configuration options, see all configuration options.
Building/publishing documentation¶
To process and publish the documentation set, invoke Sphinx with the
confluence
builder (or a desired builder) to perform
building/publishing:
make confluence
(or)
sphinx-build -b confluence . _build/confluence -E -a
(or)
python -m sphinx -b confluence . _build/confluence -E -a
Documentation of the project should now be published to the Confluence site.
For users who set the dryrun option above (confluence_publish_dryrun
), they
may inspect the output of the run to confirm what the publish event will
perform. If the desired result is observed, a user can remove the dryrun option
and re-invoke the build/publish command to publish onto the configured
Confluence instance.
Configuration¶
The following is an example of simple configuration (config.py
) for
Confluence generation and publishing:
extensions = [
'sphinxcontrib.confluencebuilder',
]
confluence_publish = True
confluence_space_key = 'TEST'
confluence_parent_page = 'Documentation'
confluence_server_url = 'https://intranet-wiki.example.com/'
confluence_server_user = 'myawesomeuser'
confluence_ask_password = True
All configurations introduced by this extension are listed below. This extension may take advantage of a subset of Sphinx configurations as well when preparing documents.
New in version 1.9: All options provided by this extension may be set from the running
environment. For example, if confluence_publish
is not explicitly set
inside conf.py
or provided via Sphinx’s command line, this extension
may check the CONFLUENCE_PUBLISH
environment option as a fallback. Note
that this only applies options provided below and will not work for other
configuration options provided by Sphinx or other Sphinx extensions.
Essential configuration¶
- confluence_publish¶
A boolean that decides whether or not to allow publishing. This option must be explicitly set to
True
if a user wishes to publish content. By default, the value is set toFalse
.confluence_publish = True
- confluence_server_url¶
The URL for the Confluence instance to publish to. The URL should be prefixed with
https://
orhttp://
(depending on the URL target). The target API folder should not be included in the URL (i.e. excludingrest/api/
). For a Confluence Cloud instance, an example URL configuration is as follows:confluence_server_url = 'https://example.atlassian.net/wiki/'
For a Confluence Server instance, an example URL configuration, if the instance’s REST API is
https://intranet-wiki.example.com/rest/api/
, should be as follows:confluence_server_url = 'https://intranet-wiki.example.com/'
- confluence_space_key¶
New in version 1.7.
Note
Use the key value for the space, not the name of the space. For example,
MYAWESOMESPACE
instead ofMy Awesome Space
.The space key is case-sensitive (typically uppercase).
Key of the space in Confluence to be used to publish generated documents to. For example:
confluence_space_key = 'MYAWESOMESPACE'
If attempting to publish to a user’s personal space, the space’s key will typically start with a tilde value followed by the space’s identifier. For example:
confluence_space_key = '~123456789'
- confluence_server_user¶
Note
If using a personal access token (PAT), this option does not need to set (see
confluence_publish_token
).Note
If trying to use netrc authentication, support is provided by the Requests library [1]. A user can default to using a configured netrc file by not setting a value for
confluence_server_user
.The username value used to authenticate with the Confluence instance. If using Confluence Cloud, this value will most likely be the account’s E-mail address. If using Confluence Server, this value will most likely be the username value.
confluence_server_user = 'myawesomeuser@example.com' (or) confluence_server_user = 'myawesomeuser'
- confluence_server_pass¶
Caution
It is never recommended to store an API token or raw password into a committed/shared repository holding documentation.
A documentation’s configuration can modified various ways with Python to pull an authentication token for a publishing event such as reading from an environment variable, reading from a local file or acquiring a password from
getpass
. If desired, this extension provides a method for prompting for a password (seeconfluence_ask_password
).Note
If attempting to use a personal access token (PAT), use the
confluence_publish_token
option instead.The password value used to authenticate with the Confluence instance. If using Confluence Cloud, it is recommended to use an API token for the configured username value (see API tokens):
confluence_server_pass = 'vsUsrSZ6Z4kmrQMapSXBYkJh'
If API tokens are not being used, the plaintext password for the configured username value can be used:
confluence_server_pass = 'myawesomepassword'
- confluence_publish_token¶
New in version 1.8.
Caution
It is never recommended to store a personal access tokens (PAT) into a committed/shared repository holding documentation.
A documentation’s configuration can modified various ways with Python to pull an authentication token for a publishing event such as reading from an environment variable, reading from a local file or acquiring a token from
getpass
.Note
If attempting to use an API token, use the
confluence_server_pass
option instead.The personal access token value used to authenticate with the Confluence instance (see Using Personal Access Tokens):
confluence_publish_token = 'AbCdEfGhIjKlMnOpQrStUvWxY/z1234567890aBc'
Generic configuration¶
- confluence_add_secnumbers¶
New in version 1.2.
Add section numbers to page and section titles if
toctree
uses the:numbered:
option. By default, this is enabled:confluence_add_secnumbers = True
See also
confluence_publish_prefix
.
- confluence_code_block_theme¶
New in version 2.2.
Note
This option is only supported using the
v1
editor.Specifies the color scheme to use when displaying a Confluence code block macro.
confluence_code_block_theme = 'Midnight'
For configuring the theme on individual code blocks, see class hints.
- confluence_default_alignment¶
New in version 1.3.
Explicitly set which alignment type to use when a default alignment value is detected. As of Sphinx 2.0+, the default alignment is set to
center
. Legacy versions of Sphinx had a default alignment ofleft
. By default, this extension will use a Sphinx-defined default alignment unless explicitly set by this configuration value. Accepted values areleft
,center
orright
.confluence_default_alignment = 'left'
- confluence_domain_indices¶
New in version 1.7.
A boolean or list value to configure whether or not generate domain-specific indices. If configured to a value of
True
, all domain-specific indices generated when processing a documentation set will have a Confluence document created. If configured with a list of index names, any matching domain-index with a matching name will have a Confluence document created. By default, domain-specific indices are disabled with a value ofFalse
.confluence_domain_indices = True (or) confluence_domain_indices = [ 'py-modindex', ]
- confluence_editor¶
New in version 2.0.
Note
Confluence’s
v1
editor provides a larger support for Sphinx features than the newer editor. Users can compare the difference in editors by inspecting the online demo.Using the
v2
editor with Confluence server may yield unexpected results.If a page is published with a
v2
editor, an attempt to re-publish with av1
editor style may be ignored in Confluence Cloud. In such situations, users are recommended to delete the pages on Confluence and then retry the publish attempt with this extension.
A string value to indicate which Confluence editor to target. The following editor values are supported:
v1
: Use Confluence’s older editor (default).v2
: Use Confluence’s newer editor (fabric).
A user can choose which version of the editor to build and published documentation with. This extension may adjust how content is generated based on which editor is selected. Not all Confluence editors are equal – some features supported in one editor may not be supported in another. For example, if documentation relies indenting bullet lists, content may only be properly rendered with the
v1
editor; where if users want to new styled Confluence admonitions (warnings, notes, etc.), these are only available in thev2
editor.confluence_editor = 'v1'
For per-document overrides, please see the
confluence_metadata
directive.
- confluence_header_file¶
The name of the file to use header data. If provided, the raw contents found inside the header file will be added to the start of all generated documents. The file path provided should be relative to the build environment’s source directory. For example:
confluence_header_file = 'assets/header.tpl'
See also:
- confluence_header_data¶
New in version 1.9.
Takes an optional dictionary. If this value is set then
confluence_header_file
is interpreted as a jinja2 template with these values passed in. If this value is not set thenconfluence_header_file
is included verbatim.See also
confluence_header_file
.
- confluence_include_search¶
New in version 1.7.
A boolean value to configure whether or not generate a search page. If configured to a value of
True
, a search page will be created with a search macro configured to search on the configured space. If asearch
document is registered in a documentation’s toctree, a search page will be generated and will replace the contents of the providedsearch
page. To avoid the implicit enablement of this feature, the generation of a search page can be explicitly disabled by setting this value toFalse
. By default, search page generation is automatically managed with a value ofNone
.confluence_include_search = True
- confluence_page_generation_notice¶
New in version 1.7.
Changed in version 2.5: Accept a string for custom notice.
This option can be set with a boolean value to whether or not to generate a message at the top of each document that the page has been automatically generated.
confluence_page_generation_notice = True
Alternatively, users may set a custom message to display.
confluence_page_generation_notice = 'My awesome message.'
By default, this notice is disabled with a value of
False
.
- confluence_page_hierarchy¶
Changed in version 2.0: Option is enabled by default.
A boolean value to whether or not nest pages in a hierarchical ordered. The root of all pages is typically the configured root_doc. If a root_doc instance contains a toctree, listed documents will become child pages of the root_doc. This cycle continues for child pages with their own toctree markups. By default, hierarchy mode is enabled with a value of
True
.confluence_page_hierarchy = True
Note that even if hierarchy mode is enabled, the configured root_doc page and other published pages that are not defined in the complete toctree, these documents will still be published and uploaded to either the configured
confluence_parent_page
or in the root of the space.
- confluence_prev_next_buttons_location¶
New in version 1.2.
A string value to where to include previous/next buttons (if any) based on the detected order of documents to be included in processing. Values accepted are either
bottom
,both
,top
orNone
. By default, no previous/next links are generated with a value ofNone
.confluence_prev_next_buttons_location = 'top'
- confluence_secnumber_suffix¶
New in version 1.2.
The suffix to put after section numbers, before section name.
confluence_secnumber_suffix = '. '
See also
confluence_add_secnumbers
.
- confluence_use_index¶
New in version 1.7.
A boolean value to configure whether or not generate an index page. If configured to a value of
True
, an index page will be created. If agenindex
document is registered in a documentation’s toctree, index content will be generated and will replace the contents of the providedgenindex
page. To avoid the implicit enablement of this feature, the generation of an index page can be explicitly disabled by setting this value toFalse
. By default, index generation is automatically managed with a value ofNone
.confluence_use_index = True
- singleconfluence_toctree¶
New in version 1.7.
A boolean value to configure whether or not TOC trees will remain in place when building with a
singleconfluence
builder. By default, this option is disabled with a value ofFalse
.singleconfluence_toctree = True
Publishing configuration¶
- confluence_api_mode¶
New in version 2.5.
Configures the API mode to use for REST requests. Certain Confluence instances support a newer version of REST APIs (e.g. Confluence Cloud). This extension will attempt to use an appropriate API mode for a configuration set. However, a user can override the operating API mode based on preference or when handling situations where this extension cannot automatically determine the best API mode to use. Values accepted are either
v1
orv2
.confluence_api_mode = 'v2'
By default, if a Confluence Cloud configuration is detected, this extension will use
v2
. For all other cases, the default isv1
.
- confluence_ask_password¶
Warning
User’s running Cygwin/MinGW may need to invoke with
winpty
to allow this feature to work.Provides an override for an interactive shell to request publishing documents using an API key or password provided from a shell environment. While a password is typically defined in the option
confluence_server_pass
(either directly set, fetched from the project’sconfig.py
or passed via an alternative means), select environments may wish to provide a way to accept an authentication token without needing to modify documentation sources or having a visible password value in the interactive session requesting the publish event. By default, this option is disabled with a value ofFalse
.confluence_ask_password = False
A user can request for a password prompt by invoking build event by passing the define through the command line:
sphinx-build [options] -D confluence_ask_password=1 <srcdir> <outdir>
Note that some shell sessions may not be able to pull the password value properly from the user. For example, Cygwin/MinGW may not be able to accept a password unless invoked with
winpty
.
- confluence_ask_user¶
New in version 1.2.
Provides an override for an interactive shell to request publishing documents using a user provided from a shell environment. While a user is typically defined in the option
confluence_server_user
, select environments may wish to provide a way to accept a username without needing to modify documentation sources. By default, this option is disabled with a value ofFalse
.confluence_ask_user = False
- confluence_disable_autogen_title¶
A boolean value to explicitly disable the automatic generation of titles for documents which do not have a title set. When this extension processes a set of documents to publish, a document needs a title value to know which Confluence page to create/update. In the event where a title value cannot be extracted from a document, a title value will be automatically generated for the document. For automatically generated titles, the value will always be prefixed with
autogen-
. For users who wish to ignore pages which have no title, this option can be set toTrue
. By default, this option is set toFalse
.confluence_disable_autogen_title = True
See also:
- confluence_cleanup_archive¶
New in version 1.9.
Warning
Publishing individual/subset of documents with this option may lead to unexpected results.
Note
This option cannot be used with
confluence_cleanup_purge
.Warning
Only Confluence Cloud identifies support for an archiving API. Attempting to Confluence server with this feature will most likely result in an “Unsupported Confluence API call” error (500).
Attention
Confluence’s archiving API is marked as experimental at the time of writing. This feature may experience issues over time until the API is flagged as stable (if ever).
A boolean value to whether to archive legacy pages detected in a space or parent page. By default, this value is set to
False
to indicate that no pages will be archived. If this configuration is set toTrue
, detected pages in Confluence that do not match the set of published documents will be automatically archived. If the optionconfluence_parent_page
is set, only pages which are a descendant of the configured parent page can be removed; otherwise, all flagged pages in the configured space could be archived.confluence_cleanup_archive = False
While this capability is useful for updating a series of pages, it may lead to unexpected results when attempting to publish a single-page update. The archive operation will archive all pages that are not publish in the request. For example, if an original request publishes ten documents and archives excess documents, a following publish attempt with only one of the documents will archive the other nine pages.
See also:
- confluence_cleanup_from_root¶
New in version 1.9.
A boolean value to which indicates that any cleanup attempt should be done from the root of a published root_doc page (instead of a configured parent page; i.e.
confluence_parent_page
). In specific publishing scenarios, a user may wish to publish multiple documentation sets based off a single parent/container page. To prevent any cleanup between multiple documentation sets, this option can be set toTrue
. When generating legacy pages to be removed, this extension will only attempt to populate legacy pages based off the children of the root_doc page. This option requires eitherconfluence_cleanup_archive
orconfluence_cleanup_purge
to be set toTrue
before taking effect. Ifconfluence_publish_root
is set, this option is implicitly enabled.confluence_cleanup_from_root = False
See also:
- confluence_cleanup_purge¶
New in version 1.9.
Warning
Publishing individual/subset of documents with this option may lead to unexpected results.
Note
This option cannot be used with
confluence_cleanup_archive
.A boolean value to whether or not purge legacy pages detected in a space or parent page. By default, this value is set to
False
to indicate that no pages will be removed. If this configuration is set toTrue
, detected pages in Confluence that do not match the set of published documents will be automatically removed. If the optionconfluence_parent_page
is set, only pages which are a descendant of the configured parent page can be removed; otherwise, all flagged pages in the configured space could be removed.confluence_cleanup_purge = False
While this capability is useful for updating a series of pages, it may lead to unexpected results when attempting to publish a single-page update. The purge operation will remove all pages that are not publish in the request. For example, if an original request publishes ten documents and purges excess documents, a following publish attempt with only one of the documents will purge the other nine pages.
See also:
- confluence_disable_notifications¶
A boolean value which explicitly disables any page update notifications (i.e. treats page updates from a publish request as minor updates). By default, notifications are enabled with a value of
False
.confluence_disable_notifications = True
Note that even if this option is set, there may be some scenarios where a notification will be generated for other users when a page is created or removed, depending on how other users may be watching a space.
See also
confluence_watch
.
- confluence_full_width¶
New in version 2.0.
Changed in version 2.1: Support added for Confluence’s
v1
editor.A boolean value to whether to publish pages using the full width of a page. By default, page widths will use their default/existing page widths with a value of
None
. Specifying this option toTrue
will ensure any new/updated page will attempt to use the full width of a page; likewise, specifying this option toFalse
will ensure any new/updated page will attempt to use a smaller width.confluence_full_width = True
For per-document overrides, please see the
confluence_metadata
directive.
- confluence_global_labels¶
New in version 1.3.
Note
If removing global labels for a documentation set that already has been published, user may need to publish once with the
confluence_publish_force
option to help clear old labels.Defines a list of labels to apply to each document being published. When a publish event either adds a new page or updates an existing page, the labels defined in this option will be added/set on the page. For example:
confluence_global_labels = [ 'label-a', 'label-b', ]
For per-document labels, please see the
confluence_metadata
directive. See alsoconfluence_append_labels
.
- confluence_root_homepage¶
New in version 1.6.
A boolean value to whether or not force the configured space’s homepage to be set to the page defined by the Sphinx configuration’s root_doc. By default, the root_doc configuration is ignored with a value of
False
.confluence_root_homepage = False
- confluence_parent_page¶
Note
This option cannot be used with
confluence_publish_root
.Changed in version 1.9: Support added for accepting a page identifier.
The root page found inside the configured space (
confluence_space_key
) where published pages will be a descendant of. The parent page value is used to match either the title or page identifier of an existing page. If this option is not provided, new pages will be published to the root of the configured space. If the parent page cannot be found, the publish attempt will stop with an error message. For example, the following will publish documentation under theMyAwesomeDocs
page:confluence_parent_page = 'MyAwesomeDocs'
Users wishing to publish against a parent page’s identifier value can do so by using an integer value instead. For example:
confluence_parent_page = 123456
If a parent page is not set, consider using the
confluence_root_homepage
option as well. Note that the page’s name can be case-sensitive in most (if not all) versions of Confluence.See also
confluence_publish_root
.
- confluence_publish_postfix¶
New in version 1.2.
Changed in version 1.9: Support for the
{hash}
placeholder.If set, a postfix value is added to the title of all published documents. In Confluence, page names need to be unique for a space. A postfix can be set to either:
Add a unique naming schema to generated/published documents in a space which has manually created pages; or,
Allow multiple published sets of documentation, each with their own postfix value.
An example publish postfix is as follows:
confluence_publish_postfix = '-postfix'
Postfixes can include placeholders. These placeholders are filled using the format method so formatting types can be used. For example:
confluence_publish_postfix = ' ({hash:.5})'
Supported placeholders:
{hash}
- Create a reproducible hash given the title and location based from the project root. Using this placeholder provides an option for allowing pages with the same title to be pushed to the same Confluence space without needing to manually add an index to the title.
By default, no postfix is used. See also:
- confluence_publish_prefix¶
If set, a prefix value is added to the title of all published documents. In Confluence, page names need to be unique for a space. A prefix can be set to either:
Add a unique naming schema to generated/published documents in a space which has manually created pages; or,
Allow multiple published sets of documentation, each with their own prefix value.
An example publish prefix is as follows:
confluence_publish_prefix = 'prefix-'
By default, no prefix is used. See also:
- confluence_publish_root¶
New in version 1.5.
Note
This option cannot be used with
confluence_parent_page
.The page identifier to publish the root document to. The root identifier value is used to find an existing page on the configured Confluence instance. When found, the root document of the documentation set being published will replace the content of the page found on the Confluence instance. If the root page cannot be found, the publish attempt will stop with an error message.
confluence_publish_root = 123456
See also
confluence_parent_page
.
- confluence_sourcelink¶
New in version 1.7.
Provides options to include a link to the documentation’s sources at the top of each page. This can either be a generic URL or customized to link to individual documents in a repository.
An example of a simple link is as follows:
confluence_sourcelink = { 'url': 'https//www.example.com/', }
Templates for popular hosting services are available. Instead of defining a
url
option, thetype
option can instead be set to one of the following types:bitbucket
codeberg
github
gitlab
Options to set for these types are as follows:
Option
Description
owner
(required)The owner (group or user) of a project.
repo
(required)The name of the repository.
container
The folder inside the repository which is holding the documentation. This will vary per project, for example, this may be
Documentation/
ordoc/
. If the documentation resides in the root of the repository, this option can be omitted or set to an empty string.version
(required)The version of the sources to list. This is typically set to either a branch (e.g.
main
) or tag value.For Codeberg, also include the version type. For example,
branch/main
ortag/1.0
.view
The view mode to configure. By default, this value is set to
blob
for GitHub/GitLab andview
for Bitbucket.GitHub/GitLab users may wish to change this to
edit
to create a link directly to the editing view for a specific document.host
The hostname value to override.
This option is useful for instances where a custom domain may be configured for an organization.
protocol
The protocol value to override (defaults to
https
).For example, a project hosted on GitHub can use the following:
confluence_sourcelink = { 'type': 'github', 'owner': 'sphinx-contrib', 'repo': 'confluencebuilder', 'container': 'doc/', 'version': 'main', 'view': 'edit', }
For unique environments, the source URL can be customized through the
url
option. This option is treated as a format string which can be populated based on the configuration and individual documents being processed. An example is as follows:confluence_sourcelink = { 'url': 'https://git.example.com/mydocs/{page}{suffix}', }
This configures a base URL, where
page
andsuffix
will be generated automatically. Any option provided in theconfluence_sourcelink
dictionary will be forwarded to the format option. For example:confluence_sourcelink = { 'base': 'https://git.example.com/mydocs', 'url': '{base}/{version}/{page}{suffix}', 'version': 'main', }
The
text
option can be used to override the name of the link observed at the top of the page:confluence_sourcelink = { ... 'text': 'Edit Source', }
- confluence_title_overrides¶
New in version 1.3.
Allows a user to override the title value for a specific document. When documents are parsed for title values, the first title element’s content will be used as the publish page’s title. Select documents may not include a title and are ignored; or, documents may conflict with each other but there is a desire to keep them the same name in reStructuredText form. With
confluence_title_overrides
, a user can define a dictionary which will map a given docname to a title value instead of the title element (if any) found in the respective document. By default, documents will give assigned titles values based off the first detected title element with a value ofNone
.confluence_title_overrides = { 'index': 'Index Override', }
See also:
- confluence_timeout¶
Force a timeout (in seconds) for network interaction. The timeout used by this extension is not explicitly configured (i.e. managed by Requests). By default, assume that any network interaction will not timeout. Since the target Confluence instance is most likely to be found on an external server, is it recommended to explicitly configure a timeout value based on the environment being used. For example, to configure a timeout of ten seconds, the following can be used:
confluence_timeout = 10
- confluence_watch¶
New in version 1.3.
Indicate whether or not the user publishing content will automatically watch pages for changes. In Confluence, when creating a new page or updating an existing page, the editing user will automatically watch the page. Notifications on automatically published content is typically not relevant to publishers through this extension, especially if the content is volatile. If a publisher wishes to be keep informed on notification for published pages, this option can be set to
True
. By default, watching is disabled with a value ofFalse
.confluence_watch = False
See also
confluence_disable_notifications
.
Advanced publishing configuration¶
- confluence_append_labels¶
New in version 1.3.
Allows a user to decide how to manage labels for an updated page. When a page update contains new labels to set, they can either be stacked on existing labels or replaced. In the event that a publisher wishes to replace any existing labels that are set on published pages, this option can be set to
False
. By default, labels are always appended with a value ofTrue
.confluence_append_labels = True
See also:
confluence_metadata
directive
- confluence_asset_force_standalone¶
New in version 1.3.
Provides an override to always publish individual assets (images, downloads, etc.) on each individual document which uses them. This extension will attempt to minimize the amount of publishing of shared assets on multiple documents by only hosting an asset in a single document. For example, if two documents use the same image, the image will be hosted on the root document of a set and each document will reference the attachment on the root page. A user may wish to override this feature. By configuring this option to
True
, this extension will publish asset files as an attachment for each document which may use the asset. By default, this extension will attempt to host shared assets on a single document with a value ofFalse
.confluence_asset_force_standalone = True
- confluence_asset_override¶
Provides an override for asset publishing to allow a user publishing to either force re-publishing assets or disable asset publishing. This extension will attempt to publish assets (images, downloads, etc.) to pages via Confluence’s attachment feature. Attachments are assigned a comment value with a hash value of a published asset. If another publishing event occurs, the hash value is checked before attempting to re-publish an asset. In unique scenarios, are use may wish to override this ability. By configuring this option to
True
, this extension will always publish asset files (whether or not an attachment with a matching hash exists). By configuring this option toFalse
, no assets will be published by this extension. By default, this automatic asset publishing occurs with a value ofNone
.confluence_asset_override = None
- confluence_ca_cert¶
Changed in version 2.3: Support relative paths.
Provide a CA certificate to use for server certificate authentication. The value for this option can either be a file of a certificate or a path pointing to an OpenSSL-prepared directory. Refer to the Requests SSL Cert Verification documentation (
verify
) for more information. If server verification is explicitly disabled, this option is ignored. By default, this option is ignored with a value ofNone
.confluence_ca_cert = 'ca.crt'
See also:
- confluence_cleanup_search_mode¶
New in version 2.1.
Warning
The
direct
search mode may not work on Confluence Server/DC instances. For these cases, Confluence may report the following error:(Not Implemented; 500)Page children is currently only supported for direct children.Configures the search mode used for finding descendant pages to be cleaned up (when configured for archiving/purging legacy pages). By default, this extension will search Confluence for known descendants for the root page:
confluence_cleanup_search_mode = 'search'
However, in some cases, the provided list of descendants may be incorrect (due to the Confluence version used, the state of Confluence’s ancestors table caching, etc.). This configuration can be used to tweak how this extension searches for descendants, if a user experiences issues with the default method of searching. Supported modes are as follows:
direct
: Query known descendants from a page’s cache.search
(default): Search for descendants using Confluence’s CQL capability.
Users can also postfix
-aggressive
(e.g.search-aggressive
) on a mode to perform a recursive search for descendants ensure all descendants are found. Note that an aggressive search will increase the amount of API calls to a configured Confluence instance. See also:
- confluence_client_cert¶
Provide a client certificate to use for two-way TLS/SSL authentication. The value for this option can either be a file (containing a certificate and private key) or as a tuple where both certificate and private keys are explicitly provided. If a private key is protected with a passphrase, a user publishing a documentation set will be prompted for a password (see also
confluence_client_cert_pass
). By default, this option is ignored with a value ofNone
.confluence_client_cert = 'cert_and_key.pem' (or) confluence_client_cert = ('client.cert', 'client.key')
See also:
- confluence_client_cert_pass¶
Caution
It is never recommended to store a certificate’s passphrase into a committed/shared repository holding documentation.
Provide a passphrase for
confluence_client_cert
. This prevents a user from being prompted to enter a passphrase for a private key when publishing. If a configured private key is not protected by a passphrase, this value will be ignored. By default, this option is ignored with a value ofNone
.confluence_client_cert_pass = 'passphrase'
- confluence_disable_ssl_validation¶
Warning
It is not recommended to use this option.
A boolean value to explicitly disable verification of server SSL certificates when making a publish request. By default, this option is set to
False
.confluence_disable_ssl_validation = False
- confluence_ignore_titlefix_on_index¶
New in version 1.3.
When configured to add a prefix or postfix onto the titles of published documents, a user may not want to have any title modifications on the index page. To prevent modifying an index page’s title, this option can be set to
True
. By default, this option is set toFalse
.confluence_ignore_titlefix_on_index = True
See also:
- confluence_proxy¶
REST calls use the Requests library, which will use system-defined proxy configuration; however, a user can override the system-defined proxy by providing a proxy server using this configuration.
confluence_proxy = 'myawesomeproxy:8080'
- confluence_publish_allowlist¶
New in version 1.3.
Changed in version 2.0: An empty allow list will no longer publish any documents.
Changed in version 2.3: Support relative paths.
Note
Using this option will disable the
confluence_cleanup_archive
andconfluence_cleanup_purge
options.Defines a list of documents to be published to a Confluence instance. When a user invokes sphinx-build, a user has the ability to process all documents (by default) or specifying individual filenames which use the provide files and detected dependencies. If the Sphinx-detected set of documents to process contains undesired documents to publish,
confluence_publish_allowlist
can be used to override this. This option accepts either a list of relative path document names (without an extension) or a filename which contains a list of document names.For example, a user can specify documents in a list to allow for publishing:
confluence_publish_allowlist = [ 'index', 'foo/bar', ]
Alternatively, a user can specify a filename such as following:
confluence_publish_allowlist = 'allowed-docs.txt'
Which could contain a list of documents to allow:
index foo/bar
A user can configured an allowed list of documents through the command line:
sphinx-build [options] -D confluence_publish_allowlist=index,foo/bar \ <srcdir> <outdir> index.rst foo/bar.rst
By default, this option is ignored with a value of
None
.See also
confluence_publish_denylist
.
- confluence_publish_debug¶
New in version 1.8.
Changed in version 2.5: Switched from boolean to string for setting new debugging options.
Warning
Enabling certain debugging options may reveal information such as authentication details in printed logs. Take this into consideration when sharing any debug logs with other users or enabling this option when part of a CI/CD script, job or workflow.
Configures the ability to enable certain debugging messages for requests made to a Confluence instance. This can be helpful for users attempting to debug their connection to a Confluence instance. By default, no debugging is enabled.
Available options are as follows:
all
: Enable all debugging options.deprecated
: Log warnings when a deprecated API call is used (for development purposes).headers
: Log requests and responses, including their headers.urllib3
: Enable urllib3 library debugging messages.
An example debugging configuration is as follows:
confluence_publish_debug = 'urllib3'
- confluence_publish_delay¶
New in version 1.8.
Force a delay (in seconds) for any API calls made to a Confluence instance. By default, API requests will be made to a Confluence instance as soon as possible (or until Confluence reports that the client should be rate limiting). A user can use this option to reduce how fast this extension may attempt to interact with the Confluence instance. For example, to delay each API request by almost a 1/4 of a second, the following can be used:
confluence_publish_delay = 0.25
- confluence_publish_denylist¶
New in version 1.3.
Changed in version 2.3: Support relative paths.
Note
Using this option will disable the
confluence_cleanup_archive
andconfluence_cleanup_purge
options.Defines a list of documents to not be published to a Confluence instance. When a user invokes sphinx-build, a user has the ability to process all documents (by default) or specifying individual filenames which use the provide files and detected dependencies. If the Sphinx-detected set of documents to process contain undesired documents to publish,
confluence_publish_denylist
can be used to override this. This option accepts either a list of relative path document names (without an extension) or a filename which contains a list of document names.For example, a user can specify documents in a list to deny for publishing:
confluence_publish_denylist = [ 'index', 'foo/bar', ]
Alternatively, a user can specify a filename such as following:
confluence_publish_denylist = 'denied-docs.txt'
Which could contain a list of documents to allow:
index foo/bar
A user can configured a denied list of documents through the command line:
sphinx-build [options] -D confluence_publish_denylist=index,foo/bar \ <srcdir> <outdir> index.rst foo/bar.rst
By default, this option is ignored with a value of
None
.See also
confluence_publish_allowlist
.
- confluence_publish_dryrun¶
New in version 1.3.
When a user wishes to start managing a new document set for publishing, there maybe concerns about conflicts with existing content. When the dry run feature is enabled to
True
, a publish event will not edit or remove any existing content. Instead, the extension will inform the user which pages will be created, whether or not pages will be moved and whether or not pages/attachments will be removed. By default, the dry run feature is disabled with a value ofFalse
.confluence_publish_dryrun = True
See also Confluence Spaces and Unique Page Names.
- confluence_publish_force¶
New in version 2.1.
A boolean value on whether or not to force publish page updates even if no changes are detected on the Confluence instance. When a page is published by this extension, a hash of the page will be stored on the Confluence page. This hash can be referred to later by hosts using this extension, by query the hash and comparing it against a locally prepared page update. If hashes match, no attempt will be made to update the specific page. If users are experiencing issues with this check, they may force publishing by configuring this option to
True
. By default, this option is disabled with a value ofFalse
.confluence_publish_force = True
- confluence_publish_intersphinx¶
New in version 1.9.
A publish event will upload a generated intersphinx’s inventory (object.inv) as an attachment to the configured root_doc. Inventory files are typically small and should not cause issues for most users. However, if a user desired to not publish an inventory for their documentation, this option can be configured to
False
. By default, inventories are published with a value ofTrue
.confluence_publish_intersphinx = True
- confluence_publish_headers¶
New in version 1.5.
A dictionary value which allows a user to pass key-value header information. This is useful for users who need to interact with a Confluence instance which expects (in a reverse proxy or the instance itself) specific header information to be set. By default, no custom header entries are added with a value of
None
.confluence_publish_headers = { 'CUSTOM_HEADER': '<some-value>', }
- confluence_publish_onlynew¶
New in version 1.3.
A publish event will from this extension will typically upload new pages or update existing pages on future attempts. In select cases, a user may not wish to modify existing pages and only permit adding new content to a Confluence space. To achieve this, a user can enable an “only-new” flag which prevents the modification of existing content. This includes the restriction of updating existing pages/attachments as well as deleting content. By default, the only-new feature is disabled with a value of
False
.confluence_publish_onlynew = True
- confluence_publish_orphan¶
New in version 2.1.
Whether to permit the publishing of orphan pages to a Confluence space. This option must be explicitly set to
False
if a user wishes to not publish orphan pages for their documentation. By default, the value is set toTrue
.confluence_publish_orphan = True
See also
confluence_publish_orphan_container
.
- confluence_publish_orphan_container¶
New in version 2.1.
The page identifier of the page to hold orphan pages. The parent page associated to an orphan page can vary per configuration. When a user configures for a parent page/root, orphan pages will be placed under the respective parent page/root configuration. If no parent page/root is configured, orphan pages will not be associated with a parent page.
Users can override where orphan pages are placed by using this option. By specifying a page identifier, orphan pages will placed under the configured container page. Users can also provide a special value of
0
to indicate to always publish with no parent page.confluence_publish_orphan_container = 123456
See also
confluence_publish_orphan
.
- confluence_publish_override_api_prefix¶
New in version 2.5.
Allows a user to override the path-prefix value used for API requests. API paths are commonly prefixed, such as
rest/api/
for API v1 andapi/v2/
for API v2. However, if a user is interacting with a Confluence instance which system administrators have configured non-standard locations for API endpoints, requests made by this extension will fail.To support custom API endpoint paths, this option can be used to indicate what prefix to use, if any. By default, this extension operates with an API prefix configuration matching the following:
confluence_publish_override_api_prefix = { 'v1': 'rest/api/', 'v2': 'api/v2/', }
Users may define a dictionary using
confluence_api_mode
values for keys, followed by a prefix override for their environment. For example, to disable prefixes for any API v1 request, the following may be used:confluence_publish_override_api_prefix = { 'v1': '', }
- confluence_parent_override_transform¶
New in version 2.2.
Note
Using this option may have unexpected results when using certain features of this extension. For example, users with purging enabled may not have pages with parent-ID overrides purged.
A function to override the parent page to publish a document under. This option is available for advanced users needing to tailor specific parent pages for individual documents. A provided transform is invoked with the document name and the expected parent page (numerical identifier) the document will be published under. A configuration can tweak the identifier used when publishing.
def my_publish_override(docname, parent_id): if docname == 'special-doc': return 123456 return parent_id confluence_parent_override_transform = my_publish_override
This extension will not check the validity of the identifiers set. If a provided page identifier does not exist or the publishing user does not have access to the parent page, the publication will fail with an error provided by Confluence.
See also
confluence_parent_page
.
- confluence_request_session_override¶
New in version 1.7.
A hook to manipulate a Requests session prepared by this extension. Allows users who wish to perform advanced configuration of a session for features which may not be supported by this extension.
def my_request_session_override(session): session.trust_env = False confluence_request_session_override = my_request_session_override
- confluence_server_auth¶
An authentication handler which can be directly provided to a REST API request. REST calls in this extension use the Requests library, which provide various methods for a client to perform authentication. While this extension provides simple authentication support (via
confluence_server_user
andconfluence_server_pass
), a publisher may need to configure an advanced authentication handler to support a target Confluence instance.Note that this extension does not define custom authentication handlers. This configuration is a passthrough option only. For more details on various ways to use authentication handlers, please see Requests – Authentication. By default, no custom authentication handler is provided to generated REST API requests. An example OAuth 1 is as follows:
from requests_oauthlib import OAuth1 ... confluence_server_auth = OAuth1(client_key, client_secret=client_secret, resource_owner_key=resource_owner_key, resource_owner_secret=resource_owner_secret)
- confluence_server_cookies¶
New in version 1.2.
A dictionary value which allows a user to pass key-value cookie information for authentication purposes. This is useful for users who need to authenticate with a single sign-on (SSO) provider to access a target Confluence instance. By default, no cookies are set with a value of
None
.confluence_server_cookies = { 'SESSION_ID': '<session id string>', 'U_ID': '<username>', }
- confluence_version_comment¶
New in version 1.8.
Changed in version 2.1: Support comments for first/new pages on Confluence Cloud.
Note
Confluence Server/DC does not support setting a version comment for the first/new page revision.
A string value to be added as a comment to Confluence’s version history.
confluence_version_comment = 'Automatically generated.'
Advanced processing configuration¶
- confluence_additional_mime_types¶
New in version 1.3.
Candidate selection for images will only support the internally managed list of MIME types supported by a default Confluence instance. A custom installation or future installations of a Confluence instance may support newer MIME types not explicitly managed by this extension. This configuration provides a user the option to register additional MIME types to consider for image candidates.
confluence_additional_mime_types = [ 'image/tiff', ]
- confluence_file_suffix¶
The file name suffix to use for all generated files. By default, all generated files will use the extension
.conf
.confluence_file_suffix = '.conf'
See also
confluence_file_transform
.
- confluence_file_transform¶
A function to override the translation of a document name to a filename. The provided function is used to perform translations for both Sphinx’s get_outdated_docs and write_doc methods. The default translation will be the combination of “
docname
+confluence_file_suffix
”.
- confluence_jira_servers¶
New in version 1.2.
Provides a dictionary of named Jira servers to reference when using the
jira
orjira_issue
directives. In a typical Confluence environment which is linked with a Jira instance, users do not need to take advantage of this configuration – Confluence should automatically be able to link to respectively Jira issues or map Jira query languages with a configured Jira instance. In select cases where an instance has more than one Jira instance attached, a user may need to explicitly reference a Jira instance to properly render a Jira macro. Jira-related directives have the ability to reference Jira instances, with a combination of a UUID and name; for example:.. jira_issue:: TEST-151 :server-id: d005bcc2-ca4e-4065-8ce8-49ff5ac5857d :server-name: MyAwesomeJiraServer
It may be tedious for some projects to add this information in each document. As an alternative, a configuration can define Jira instance information inside a configuration option as follows:
confluence_jira_servers = { 'server-1': { 'id': '<UUID of Jira Instance>', 'name': '<Name of Jira Instance>', } }
With the above option defined in a project’s configuration, the following can be used instance inside a document:
.. jira_issue:: TEST-151 :server: server-1
See also:
- confluence_lang_transform¶
Changed in version 2.1: Support a
None
return to use a default value.A function to override the translation of literal block-based directive language values to Confluence supported code block macro language values. The default translation accepts Pygments documented language types to Confluence-supported syntax highlight languages.
def my_language_translation(lang): return 'default' confluence_lang_transform = my_language_translation
In the event that the transform returns a
None
value, the provided language type will be transform to a default language type for a language as if this transform was not provided.
- confluence_latex_macro¶
New in version 1.8.
Note
Confluence does not provide stock support for LaTeX macros.
The name of a LaTeX macro to use when wishing to render LaTeX content on a Confluence instance. Stock Confluence instances do not support LaTeX content by default. However, if an instance has installed a marketplace add-on that supports LaTeX, this option can be used to hint to render LaTeX content (such as mathematical notation) by configuring this option.
confluence_latex_macro = 'macro-name' (or) confluence_latex_macro = { 'block-macro': 'block-macro-name', 'inline-macro': 'inline-macro-name', 'inline-macro-param': 'inline-macro-parameter', # (optional) }
The name of a LaTeX macro will vary based on which add-on is installed. For a list of known macro names or steps to determine the name of a supported macro, see the macro table/instructions found in the math guide.
If this option is not set, any LaTeX content processed in a document will instead be converted to images using dvipng/dvisvgm (see also sphinx.ext.imgmath for additional information).
See also:
- confluence_link_suffix¶
The suffix name to use for generated links to files. By default, all generated links will use the value defined by
confluence_file_suffix
.confluence_link_suffix = '.conf'
See also
confluence_link_transform
.
- confluence_link_transform¶
A function to override the translation of a document name to a (partial) URI. The provided function is used to perform translations for both Sphinx’s get_relative_uri method. The default translation will be the combination of “
docname
+confluence_link_suffix
”.
- confluence_mentions¶
New in version 1.9.
Provides a dictionary of key-to-value mappings which can be used with
confluence_mention
roles. When defining mentions, documents can reference a user’s account identifier, user key or username (depending on the Confluence instance being published to). This configuration can be used to swap the value mentioned in a document with a value specified in configuration. For example, with the following configuration:confluence_mentions = { 'myuser': '3c5369:fa8b5c24-17f8-4340-b73e-50d383307c59', }
With a document such as follows:
For more information, contact :confluence_mention:`myuser`:
The value
myuser
will be replaced with the configured account identifier. This can be useful for when trying to manage multiple user’s account identifiers when targeting a Confluence Cloud instance, as well as providing a quick-way to swap a generic contact role which may change over time.See also:
New in version 1.7.
A function to override the document list used for populating navigational buttons generated from a
confluence_prev_next_buttons_location
configuration. This can be helpful in advanced publishing cases where a user would like ignore or re-order select pages from navigation, or even reference pages outside of documentation list.def my_navdocs_transform(builder, docnames): # override and return a new docnames list return docnames confluence_navdocs_transform = my_navdocs_transform
See also
confluence_prev_next_buttons_location
.
- confluence_permit_raw_html¶
New in version 2.2.
Caution
Using this option is considered unsupported. This extension will allow users to directly publish HTML content defined in a document, but there is no guarantees that the content will render as expected, or even be able to be published to a configured Confluence instance.
Configure whether to permit the use of raw HTML content in generated documents. While Confluence renders pages through a website, content is stored using a “storage” format, which only supports a subset of HTML. Confluence may filter out or reject the publication of pages with certain HTML content.
Some documentation may rely on HTML-specific content, and if this HTML content is not too complex, this may be renderable on a Confluence instance. Users wanting to allow this can enable this option to have HTML content directly injected on pages, or even placed inside an HTML-supported macro (if such a macro is available for the target Confluence instance):
confluence_permit_raw_html = True (or) confluence_permit_raw_html = 'html'
Using this option is not supported. Content may be automatically stripped when published into Confluence, content may not render as expected (e.g. styles can be ignored, JavaScript will not function) or Confluence may reject the publication of Confluence document (i.e. failing to upload a page).
- confluence_remove_title¶
A boolean value to whether or not automatically remove the title section from all published pages. In Confluence, page names are already presented at the top. With this option enabled, this reduces having two leading headers with the document’s title. In some cases, a user may wish to not remove titles when custom prefixes or other custom modifications are in play. By default, this option is enabled with a value of
True
.confluence_remove_title = True
See also:
Other options¶
- suppress_warnings¶
New in version 2.1.
This extension supports suppressing warnings using Sphinx’s suppress_warnings configuration. The following includes additional warning types that may be suppressed:
confluence
– All warningsconfluence.unsupported_code_lang
– Unsupported code language
Deprecated options¶
- confluence_master_homepage¶
Changed in version 1.6.
This option has been renamed to
confluence_root_homepage
.
- confluence_parent_page_id_check¶
Changed in version 1.9: The
confluence_parent_page
option now accepts both a page name and identifier.The page identifier check for
confluence_parent_page
. By providing an identifier of the parent page, both the parent page’s name and identifier must match before this extension will publish any content to a Confluence instance. This serves as a sanity-check configuration for the cautious.confluence_parent_page_id_check = 123456
See also
confluence_parent_page
.
- confluence_publish_disable_api_prefix¶
Changed in version 2.5.
This option has been replaced by
confluence_publish_override_api_prefix
.
- confluence_publish_subset¶
Changed in version 1.3.
This option has been renamed to
confluence_publish_allowlist
.
- confluence_purge_from_master¶
Changed in version 1.6.
This option has been renamed to
confluence_purge_from_root
, and has since been replaced withconfluence_cleanup_from_root
.
- confluence_purge_from_root¶
Changed in version 1.9.
This option has been renamed to
confluence_cleanup_from_root
.
- confluence_space_name¶
Changed in version 1.7.
This option has been renamed to
confluence_space_key
.
Builders¶
The following outlines the Sphinx builders provided by this extension.
- confluence¶
The
confluence
builder allows a user to process a Sphinx supported documentation set to generate a Confluence supported representation. Individual documents will generate Confluence supported documents, which in turn can be published to a configured Confluence instance:sphinx-build -b confluence . _build/confluence -E -a
- singleconfluence¶
New in version 1.3.
The
singleconfluence
builder allows a user to process a Sphinx supported documentation set to generate a single document in a Confluence supported representation. The generated document can in turn be published to a configured Confluence instance:sphinx-build -b singleconfluence . _build/singleconfluence -E -a
Directives¶
The following outlines additional directives supported by this extension.
Directives listed below are only supported when using this extension. For users with documentation that is built with multiple builders, the following can be used to restrict these directives to supported builders by using the :only: directive. For example:
.. only:: builder_confluence or builder_singleconfluence
.. confluence_metadata::
:labels: label-test
Common¶
- .. confluence_excerpt::¶
New in version 2.0.
The
confluence_excerpt
directive allows a user to define a Confluence Excerpt Macro to help build snippets of content to be shared for other pages. For example:.. confluence_excerpt:: This content is reusable.
This directive supports the following options:
- :atlassian-macro-output-type: output type (block, inline)¶
When this option is configured to
inline
(default), the rendered excerpt macro will be presented inlined with other content in the page (no additional line breaks). Theblock
type can be used to help render an excerpt macro as a block-level element... confluence_excerpt:: :atlassian-macro-output-type: block This content is reusable.
Whether the macro’s content should be rendered on the page that defines it. Valid values are
true
orfalse
(default)... confluence_excerpt:: :hidden: true This content is reusable.
- :name: value (string)¶
A name value to apply to the macros “name” field. This can be used to name a specific excerpt on a page, which can be explicitly mapped to with an excerpt-include when attempting to define multiple excerpts on the same page. If only a single excerpt is created, an excerpt-include will implicitly use the first excerpt on a page.
.. confluence_excerpt:: :name: my-excerpt This content is reusable.
- .. confluence_excerpt_include:: [ref]¶
New in version 2.0.
The
confluence_excerpt_include
directive allows a user to define a Confluence Excerpt Include Macro to help include snippets of content provided by excerpt macro definitions. An include macro requires an explicit reference to the page which holds the excerpt content to load. Users can specify an exclamation-prefixed document name, referring to a local Sphinx documentation file to load an excerpt from. For example:.. confluence_excerpt_include:: !my-excerpt-docname
Users may also specify a known document title name that may be managed outside their Sphinx project set. For example:
.. confluence_excerpt_include:: Custom excerpt
To target a page on a different space, the space name can be prefixed before the document title:
.. confluence_excerpt_include:: MYSPACE:Custom excerpt
This directive supports the following options:
- :name: value (string)¶
The explicit name of the excerpt to use for a given page. If no name is provided, the excerpt-include macro will use the first available excerpt on the target page.
.. confluence_excerpt_include:: !my-excerpt-docname :name: my-excerpt
- :nopanel: flag (boolean)¶
Whether the macro’s content should remove the panel around the excerpted content. Valid values are
true
orfalse
(default)... confluence_excerpt_include:: !my-excerpt-docname :nopanel: true
- .. confluence_expand::¶
New in version 1.3.
The
confluence_expand
directive allows a user to define a Confluence Expand Macro to help manage the visibility of content on a page. For example:.. confluence_expand:: This content is captured inside the expand macro.
This directive supports the following options:
- :title: value (string)¶
A string value to apply to the macros “title” field.
.. confluence_expand:: :title: View more details... This content is captured inside the expand macro.
- .. confluence_metadata::¶
New in version 1.3.
Changed in version 2.2: Added
editor
andfull-width
support.The
confluence_metadata
directive allows a user to define metadata information to be added during a publish event. This directive supports the following options:- :editor: value (v1, v2)¶
Pages are publish with the editor type configured through the
confluence_editor
option. However, users can override the editor for a specific page using theeditor
metadata option... confluence_metadata:: :editor: v2
See also
confluence_editor
(ref).
- :full-width: flag (boolean)¶
Pages are publish with the full-width appearance configured through the
confluence_full_width
option. However, users can override the appearance for a specific page using thefull-width
metadata option... confluence_metadata:: :full-width: false
See also
confluence_full_width
(ref).
- :labels: value (space separated strings)¶
A space-separated list of label strings to apply to a page. The following example will result in the labels
label-a
andlabel-b
being added to the document which defines this directive... confluence_metadata:: :labels: label-a label-b
See also
confluence_global_labels
(ref).
- .. confluence_newline::¶
New in version 1.7.
The
confluence_newline
directive supports the injection of a newline in a document where seperation may be desired between inlined elements... confluence_newline::
- .. confluence_toc::¶
New in version 1.9.
The
confluence_toc
directive allows a user to define a Confluence Table of Contents Macro. Users are typically recommended to use reStructuredText’s Table of Contents directive when generating local table of contents; and Confluence’s Table of Contents macro is typically not a replacement of Sphinx’s toctree directive. However, if a user wishes to take advantage of Confluence’s TOC-specific macro capabilities, the following can be used:.. confluence_toc::
This directive supports the following options:
- :absolute-url: flag (boolean)¶
Whether the macro should generate full URLs for TOC entry links. Valid values are
true
orfalse
(default)... confluence_toc:: :absolute-url: true
- :exclude: value (string)¶
Filter heading to exclude entries matching the provided value. The value should support a regular expressions string.
- :include: value (string)¶
Filter heading to include entries matching the provided value. The value should support a regular expressions string.
- :indent: value (string)¶
The indent to apply for header entries.
.. confluence_toc:: :indent: 15px
- :max-level: count (number)¶
Defines the lowest heading level to include in the table of contents.
.. confluence_toc:: :max-level: 10
- :min-level: count (number)¶
Defines the highest heading level to include in the table of contents.
.. confluence_toc:: :min-level: 1
- :outline: flag (boolean)¶
Whether the macro should include outline numbering for entries. Valid values are
true
orfalse
(default)... confluence_toc:: :outline: true
- :printable: flag (boolean)¶
Whether the macro should render when a user prints a Confluence page. Valid values are
true
(default) orfalse
... confluence_toc:: :printable: true
- :separator: separator style type of the toc (brackets, braces, parens, <user-defined>)¶
When the
type
option is configured toflat
, this option can configure the separator type applied between header entries. By default, the separator type is set tobrackets
... confluence_toc:: :separator: braces
- :style: list style type of the toc (default, none, disc, circle, square, decimal, lower-alpha, lower-roman, upper-roman)¶
Configures how the table of contents will be style its list type. By default, the style type is set to
default
... confluence_toc:: :style: square
- :type: outline type of the toc (flat or list)¶
Configures how the table of contents will be style its structure. Valid values are
flat
orlist
(default)... confluence_toc:: :type: flat
Jira¶
The following directives can be used to help include Jira macros into generated Confluence documents.
- .. jira:: [jql]¶
New in version 1.2.
The
jira
directive allows a user to build a Jira macro to be configured with a provided JQL query. For example:.. jira:: project = "TEST"
This directive supports the following options:
- :columns: value (comma separated numbers)¶
A comma-separated list of columns to use when displaying the macro to show in the Jira table.
.. jira:: project = "TEST" :columns: key,summary,updated,status,resolution
- :count: flag (boolean)¶
Whether the macro should display a table or just the number of issues. Valid values are
true
orfalse
... jira:: project = "TEST" :count: true
- :maximum_issues: count (number)¶
The maximum number of issues a
jira
directive will display. By default, Confluence defaults to20
... jira:: project = "TEST" :maximum_issues: 10
- :server: instance (string)¶
Indicates a named Jira server provided via
confluence_jira_servers
(ref). When set, optionsserver-id
andserver-name
cannot be set... jira:: project = "TEST" :server: server-1
- :server-id: uuid (string)¶
The UUID of the Jira server to link with. When set, the option
server-name
needs to be set and the optionserver
cannot be set... jira:: project = "TEST" :server-id: d005bcc2-ca4e-4065-8ce8-49ff5ac5857d :server-name: MyAwesomeJiraServer
- :server-name: name (string)¶
The name of the Jira server to link with. When set, the option
server-id
needs to be set and the optionserver
cannot be set... jira:: project = "TEST" :server-id: d005bcc2-ca4e-4065-8ce8-49ff5ac5857d :server-name: MyAwesomeJiraServer
- .. jira_issue:: [issue-id]¶
New in version 1.2.
The
jira_issue
directive allows a user to build a Jira macro to be configured with a provided Jira key. For example:.. jira_issue:: TEST-123
This directive supports the following options:
- :server: instance (string)¶
Indicates a named Jira server provided via
confluence_jira_servers
(ref). When set, optionsserver-id
andserver-name
cannot be set... jira_issue:: TEST-123 :server: server-1
- :server-id: uuid (string)¶
The UUID of the Jira server to link with. When set, the option
server-name
needs to be set and the optionserver
cannot be set... jira_issue:: TEST-123 :server-id: d005bcc2-ca4e-4065-8ce8-49ff5ac5857d :server-name: MyAwesomeJiraServer
- :server-name: name (string)¶
The name of the Jira server to link with. When set, the option
server-id
needs to be set and the optionserver
cannot be set... jira_issue:: TEST-123 :server-id: d005bcc2-ca4e-4065-8ce8-49ff5ac5857d :server-name: MyAwesomeJiraServer
See also Jira roles.
LaTeX¶
Note
LaTeX support requires dvipng/dvisvgm to be installed on system; however,
if a Confluence instance supports a LaTeX macro, the
confluence_latex_macro
(ref) option can
be used instead. For more information, please read Math support.
The following directive can be used to help add LaTeX content into a Confluence page.
- .. confluence_latex::¶
New in version 1.8.
The
confluence_latex
directive allows a user to add LaTeX content into a document. For example:.. confluence_latex:: $\mathfrak{H}$ello world!
This directive supports the following options:
- :align: "left", "center", or "right" (string)¶
The alignment to apply on the LaTeX content. By default, the value is set to
center
... confluence_latex:: :align: left $\mathfrak{H}$ello world!
See also LaTeX roles.
Smart links¶
Note
Smart links will only render when using the v2 editor
(see confluence_editor
; ref).
- .. confluence_doc::¶
New in version 2.1.
The
confluence_doc
directive allows a user to define a link to a document that is styled with a card appearance. The directive accepts the name of a document in an absolute or relative fashion (in the same manner as Sphinx’s :doc: role). For example:.. confluence_doc:: my-other-page
This directive supports the following options:
- :card: card type (block, embed)¶
When using
block
, a smart link card is generated for the document link. The card will provide a summary of the target document. When usingembed
, the contents of the document will rendered on the page... confluence_doc:: my-other-page :card: block
- :layout: layout type (align-start, align-end, center, wrap-left, wrap-right)¶
Note
This option is only applicable when using an
embed
card.Specifies how an embedded card will be laid out on a page. Embedded cards will default to 100% width. Therefore, to take advantage of certain layout capabilities, users should also assign an appropriate width as well.
.. confluence_doc:: my-other-page :card: embed :layout: align-end :width: 20
- :width: value (integer)¶
Note
This option is only applicable when using an
embed
card.Specifies the width to apply for an embedded card. The width is a value from 0 to 100 (e.g. a value of
80
for 80% of the page)... confluence_doc:: my-other-page :card: embed :width: 50
- .. confluence_link::¶
New in version 2.1.
The
confluence_link
directive allows a user to define a link to a page that is styled with a card appearance. The directive accepts a URL. How Confluence renders the context of a link card will vary based on which link targets Confluence supports. For example:.. confluence_link:: https://example.com
This directive supports the following options:
- :card: card type (block, embed)¶
When using
block
, a smart link card is generated for the link. The card will provide a summary of the target link. When usingembed
, the contents of the link will rendered on the page... confluence_link:: https://example.com :card: block
- :layout: layout type (align-start, align-end, center, wrap-left, wrap-right)¶
Note
This option is only applicable when using an
embed
card.Specifies how an embedded card will be laid out on a page. Embedded cards will default to 100% width. Therefore, to take advantage of certain layout capabilities, users should also assign an appropriate width as well.
.. confluence_link:: https://example.com :card: embed :layout: align-end :width: 20
- :width: value (integer)¶
Note
This option is only applicable when using an
embed
card.Specifies the width to apply for an embedded card. The width is a value from 0 to 100 (e.g. a value of
80
for 80% of the page)... confluence_link:: https://example.com :card: embed :width: 50
See also smart link roles.
Roles¶
The following outlines additional roles supported by this extension.
Emoticon Macro¶
The following role can be used to help include Confluence emoticon macros into generated Confluence documents.
- :confluence_emoticon:¶
New in version 1.9.
The
confluence_emoticon
role allows a user to build inlined emoticon macros. For example::confluence_emoticon:`tick`: This is done. :confluence_emoticon:`cross`: This is incomplete.
Jira¶
The following role can be used to help include Jira macros into generated Confluence documents.
- :jira:¶
New in version 1.7.
The
jira
role allows a user to build an inlined Jira macro to be configured with a provided Jira key. For example:See :jira:`TEST-123` for more details.
See also Jira directives.
LaTeX¶
Note
LaTeX support requires dvipng/dvisvgm to be installed on system; however,
if a Confluence instance supports a LaTeX macro, the
confluence_latex_macro
(ref) option can
be used instead. For more information, please read Math support.
The following role can be used to help include LaTeX content into generated Confluence documents.
- :confluence_latex:¶
New in version 1.8.
The
confluence_latex
role allows a user to build inlined LaTeX content. For example:This is a :confluence_latex:`$\\mathfrak{t}$est`.
See also LaTeX directives.
Mentions¶
The following role can be used to help include Confluence mentions into generated Confluence documents.
- :confluence_mention:¶
New in version 1.9.
Warning
Confluence Cloud mentions should always use account identifiers; where Confluence Server mentions should use either usernames or user keys. Attempting to use Confluence Cloud account identifiers when publishing to a Confluence server will most likely result in an “Unsupported Confluence API call” error (500).
The
confluence_mention
role allows a user to build inlined mentions. For Confluence Cloud instances, a mention to a specific user’s account identifier would be defined as follows:See :confluence_mention:`3c5369:fa8b5c24-17f8-4340-b73e-50d383307c59`.
For Confluence Server instances, a mention to a specific user can either be set to the username value, or a user’s key value:
For more information, contact :confluence_mention:`myuser`. (or) Contact :confluence_mention:`b9aaf35e80441f415c3a3d3c53695d0e` for help.
A user mapping table can also be configured using the
confluence_mentions
(ref) option.
Smart links¶
Note
Smart links will only render when using the v2 editor
(see confluence_editor
; ref).
Support for inlined smart links can be created using the following roles.
- :confluence_doc:¶
New in version 2.1.
The
confluence_doc
role allows a user to define an inlined link to a document that is styled with a card appearance. The role accepts the name of a document in an absolute or relative fashion (in the same manner as Sphinx’s :doc: role). For example:See :confluence_doc:`my-other-page`.
- :confluence_link:¶
New in version 2.1.
The
confluence_link
role allows a user to define an inlined link to a page that is styled with a card appearance. The role accepts a URL. How Confluence renders the context of a link card will vary based on which link targets Confluence supports. For example:See :confluence_link:`https://example.com`.
See also smart link directives.
Status Macro¶
The following role can be used to help include Confluence status macro into generated Confluence documents.
- :confluence_status:¶
New in version 1.9.
The
confluence_status
role allows a user to build inlined status macros. For example::confluence_status:`My Status`
The color of a status macro can be configured to a value supported by Confluence’s status macro. For example, to adjust the status value to a yellow color, the following can be used:
:confluence_status:`WARNING <yellow>`
To tweak the style of a status macro to an outlined variant (if supported by the configured Confluence editor), adjust the color enclosure to square brackets:
:confluence_status:`PASSED [green]`
Strikethrough¶
The following role can be used to explicitly define strikethrough text into generated Confluence documents.
- :confluence_strike:¶
New in version 2.1.
The
confluence_strike
role allows a user to build inlined text that has been styled with a strikethrough. For example::confluence_strike:`My text`
Features¶
The following outlines the reStructuredText/Sphinx markup, configuration entries and more supported by this extension. The intent of this extension is to support various standard Sphinx features that can be rendered on a Confluence instance. Below will identify features that have been tested, planned to be implemented in the future or is not compatible with Confluence.
reStructuredText markup¶
Type |
Notes |
---|---|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Limited support. Only auto-enumerator lists ( |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Limited support. When using a Confluence v2 editor, images cannot be inlined. |
|
Supported |
|
Supported |
|
Supported |
|
Supported with additional system tools. Requires a LaTeX and dvipng/dvisvgm installation. When using a Confluence v2 editor, images cannot be offset to be aligned in a paragraph. |
|
Limited support. When using a Confluence v2 editor, literal blocks cannot be parsed and the contents will be placed inside a code macro. |
|
Supported |
|
Supported |
|
Supported. Use the |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
(note: directive options “class” and “name” are mostly ignored as they are not supported in a Confluence format document)
Sphinx markup¶
Type |
Notes |
---|---|
Supported |
|
Limited support. Supported languages (for highlighting) are limited to
the languages supported by Confluence’s
code block macro. This applies to a language defined
in a The When the |
|
Supported |
|
Supported |
|
Supported |
|
Limited support. When using a Confluence v2 editor, the maximum columns for an hlist is three. |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
|
Supported |
Markdown support¶
This extension can support the rendering of Markdown content with the use of
Sphinx with the MyST Parser. Most content can be translated to an
applicable Confluence storage format. However, not all content produced by
MyST Parser will work with this extension. Specifically, any directives that
generate HTML content or users who add raw HTML content to documents are not
accepted by default by this extension. This includes line breaks,
strikethroughs and more. Users may attempt to use the
confluence_permit_raw_html
option to help workaround select use cases, but
the use of the option is unsupported. When the option is enabled, published
content may not render as expected or may not be able to be published.
Extensions¶
This extension will attempt to support any extension that is integrated in Sphinx’s main source repository. The following section shows the status of each of these extensions:
Type |
Notes |
---|---|
Supported |
|
Supported |
|
Supported |
|
N/A |
|
Supported |
|
Supported |
|
Supported |
|
N/A |
|
Supported |
|
Supported |
|
N/A |
|
Supported |
|
Supported |
|
Limited support. Users should have no issues when using
external modules via |
|
Unsupported. Confluence does not support the injection of JavaScript into a page in most scenarios. |
|
Unsupported. This extension only supports injecting
references for the |
|
Unsupported. Confluence does not support the injection of JavaScript into a page in most scenarios. |
|
Supported |
|
Supported |
|
Unsupported. This extension only supports injecting
references for the |
Extensions (Third-party)¶
Note
Support with third-party extensions (if any) may be limited. While an
extension may work with other builders (such as the html
builder), it
may be implemented in a way which it cannot be integrated with this
extension. In addition, some features that an extension may use (e.g. using
JavaScript) cannot be used with a stock Confluence instance and therefore,
cannot be supported.
Atlassian Confluence Builder for Sphinx does not guarantee support for third-party extensions found outside of Sphinx’s main source repository. Changes are considered towards this extension’s processing and API to make it flexible for other extensions to integrate. Also, this extension may provide optional support for select third-party extensions (if permitted and rational), to help improve user experience.
Developers wishing to integrate a third-party extension with Atlassian Confluence Builder can either attempt to add implementation inside the third-party extension itself, propose non-intrusive changes to this extension or create a new extension which can bind both desired extensions together (e.g. sphinx-confluence-nbsphinx-test). Any changes directly submitted to be added into this extension’s repository will be limited to the arbitrary release/development windows of this extension.
The following table shows a most recent state of various third-party extensions interacting with this extension:
Type |
Notes |
---|---|
Limited support. Formatting of content may not be as expected. |
|
Limited support. Can render JSON data inside code blocks. Content has collapse all data or expand all data, but not parts of the data. |
|
Supported |
|
Supported |
|
Limited support. Formatting of content may not be as expected.
The |
|
Supported |
|
Supported. May require configuration of the
|
|
Limited support. PNGs only; cannot configure for SVG at this time. |
|
Limited support. PNGs only; cannot configure for SVG at this time. |
|
Supported |
|
Supported |
|
Supported |
|
Limited support. Requires a PNG/SVG configuration. |
|
Limited support. PNGs only; cannot configure for SVG at this time. |
|
Supported |
|
Supported. sphinxcontrib-plantuml provides its own support for this extension. |
|
Supported |
|
Limited support. PNGs only; cannot configure for SVG at this time. |
|
Supported |
|
Supported |
|
Supported |
Other¶
If a feature or extension is not listed above, is not working as expected or brings up another concern, feel free to bring up an issue:
Atlassian Confluence Builder for Confluence - Issues
Tips¶
Confluence spaces and unique page names¶
An important consideration when using this extension is that Confluence has a requirement to having unique page names for a given space. When this extension parses a document’s title value, the title is used as either a creation point or an update point (i.e. if the page name does not exist, it will be created; if the page name does exist, it will be updated).
A user must be cautious when mixing a space with manually prepared content and published content from this extension. Consider the following use case.
A space MYAWESOMESPACE
already exists with the following content:
MyHome
About
Tutorials
See Also
A user may desire to publish a series of Sphinx documentation into a “container” page, so the page “Documentation” is made:
MyHome
About
Documentation
Tutorials
See Also
If the Sphinx documentation contains a page named “About”, an unexpected event may occur for new users after publishing for the first time. A user might expect the following to be published:
MyHome
About
Documentation
About (new)
Installing (new)
User Guide (new)
Other (new)
Tutorials
See Also
However, since Confluence only supports a single “About” page for a space, the original “About” page is updated with new content from the documentation set and is moved as a child of the container page:
MyHome
Documentation
About (updated and moved)
Installing (new)
User Guide (new)
Other (new)
Tutorials
See Also
Users needing to restrict the extension from possibly mangling manually prepared
content can use the confluence_publish_prefix
(ref) or confluence_publish_postfix
(ref) options.
See also the dry run capability and the title overrides capability.
Setting a publishing timeout¶
By default, this extension does not define any timeouts for a publish event. It
is recommended to provide a timeout value based on the environment being used
(see confluence_timeout
; ref).
Connection troubleshooting¶
The majority of connection issues reported are typically configuration issues. For example, attempting to configure a Confluence Cloud API token using a configuration designed for a Confluence Server Personal Access Token (PAT).
Users may try to invoke a connection test to help debug connection issues. To invoke a connection test, run the following command inside the Sphinx project:
$ python -m sphinxcontrib.confluencebuilder connection-test
Fetching configuration information...
Running Sphinx v7.2.6
...
Connecting to Confluence instance... connected!
Fetching Confluence instance information... fetched!
Decoding information... decoded!
Parsing information... parsed!
Type: confluence
Version: 1000.0.0-395b9ccce521
Build: 6452
Asking for help¶
Having trouble or concerns using this extension? Do not hesitate to bring up an issue:
Atlassian Confluence Builder for Confluence - Issues
For issues when using this extension, generating a report and including this content in an issue may be helpful towards finding a solution. To generate a report, run the following command from the documentation directory:
$ python -m sphinxcontrib.confluencebuilder report
...
Confluence builder report has been generated.
Please copy the following text for the GitHub issue:
------------[ cut here ]------------
(system)
...
(configuration)
...
(confluence instance)
...
------------[ cut here ]------------
Guides¶
The following contains a series of guides which may help a user using the Confluence Builder extension in a Sphinx-enabled environment.
Class hints¶
The following outlines all available class-related hints supported by the Confluence builder extension.
collapse
¶
See Collapsed content for more details.
confluence-theme-<theme>
¶
New in version 2.2.
When this class hint is applied to a literal/code block, this provides the ability to override the theme configured for an individual code-block macro. For example:
.. code-block:: python
:class: confluence-theme-FadeToGrey
def main():
print 'Hello, world!'
if __name__ == '__main__':
main()
See also confluence_code_block_theme.
strike
¶
New in version 1.7.
When this class hint is applied to inlined text, the text will be styled
with a strikethrough style. Sphinx projects may define the following in
a document to support the strikethrough of text in both the html
and
confluence
builders (assuming the HTML documents are also prepared to
support the strike
class):
.. role:: strike
:class: strike
This is an :strike:`example`.
Projects may also move the role definition inside the project’s conf.py
inside rst_prolog as follows:
rst_prolog = """
.. role:: strike
:class: strike
"""
Projects using Markedly Structured Text - Parser can also
take advantage of the role defined in rst_prolog
(above) and use the
role as follows:
This is an {strike}`example`.
Collapsed content¶
There are a series of collapsed element capabilities supported by the Confluence builder extension. This guide will cover the available options that can be used.
Expand directive¶
New in version 1.3.
This extension provides a confluence_expand
directive to help collapse
content. For example:
.. confluence_expand::
This content is captured inside the expand macro.
This directive will only work when using the Confluence builder. See also the Confluence expand directive.
Class hints¶
New in version 2.1: Support added for containers.
New in version 2.0: Support added for code blocks.
This extension provides support for managing collapsed elements when a
collapse
class hint is provided. If a container is defined with the
style configured, the contents of the directive will be collapsed:
.. container:: collapse
This paragraph should be collapsed.
When using the code block directive, providing a collapse style hint will also collapse the code block:
.. code-block:: python
:class: collapse
import example
example.method()
sphinx-toolbox’s collapse directive¶
New in version 1.7.
When using the sphinx-toolbox extension, the collapse
directive
should be able to manage collapsed content. For example:
.. collapse:: Details
This paragraph should be collapsed.
For more details, please see sphinx-toolbox’s documentation on the collapse directive.
Confluence Macros¶
The Confluence Builder extension may attempt to support various stock Confluence macros through the use of custom directives or roles. However, not all macros will have a markup defined for them with this extension. Some macros may not have a graceful way to be used in documentation, a stock macro has yet to have a directive/role created or the macro is provided by a third-party vendor.
Note
Typically, third-party vendor macros are not added into this extension. Exceptions may be made for free addons. However, this extension’s main goal is to focus on supporting stock macros.
If a stock Confluence macro does not have a directive/role created for it, users are welcome to submit a pull request to support the macro or create an issue outlining a desire for one. For developers wishing to support a third-party macro, it is recommended that developers create a custom extension providing support for this macro that can integrate with the Confluence Builder extension.
That all being said, users looking to use macros that do not have a directive/role define can add any custom macro using the raw directive. Consider the following examples. A user can add a “Cheese” macro using the following in a reStructuredText document:
.. raw:: confluence_storage
<ac:structured-macro ac:name="cheese" ac:macro-id="5d87ef61-1fcf-4d30-8d3b-82305e13233a" />
Or create an “Info” macro in a Markdown document:
```{raw} confluence_storage
<ac:structured-macro ac:name="info" ac:macro-id="ecc1aad7-f2f5-4b75-86d1-786370e6d499">
<ac:rich-text-body>
<p>Test</p>
</ac:rich-text-body>
</ac:structured-macro>
```
Try adding either of these example into a document to observe their results.
After trying out adding a raw macro from above, follow the steps in the next section to help add a custom macro to a document.
Steps¶
To add a custom macro available on a Confluence instance, perform the following steps:
Creating a new page on the Confluence instance
Add the specific macro to be captured on the page and saving
Selecting the page’s option menu and selecting “View Storage format”
Look for the
ac:structured-macro
tags in the storage formatCopy the tags and place them into a raw-directive in the documentation
Math support¶
Changed in version 1.8: Support for using Confluence-supported LaTeX macros.
Changed in version 1.7: SVG-generated math images requires the
sphinx.ext.imgmath
extension to be explicitly
registered to work.
Changed in version 1.4: Support both block and inlined math elements.
New in version 1.2: Initial support for math.
Mathematical notation is supported when using the Confluence builder extension. There are some limitations and special cases a user may wish to consider when trying to get the most our of their documentation/environment.
The recommended approach for rendering math in Confluence is using Sphinx’s sphinx.ext.imgmath extension. This extension renders math via LaTeX and uses either dvipng or dvisvgm to create PNG or SVG images which are published to Confluence (which requires installing a LaTeX engine alongside the Sphinx installation, such as a TeX suite/MiKTeX installation).
Math can be defined using the :math:
role or the .. math::
directive.
For example:
The Pythagorean theorem formula is :math:`a^2 + b^2 = c^2`.
The mass–energy equivalence formula:
.. math::
E = mc^2
The former case will generate math content in an inlined fashion, where the latter will generate a math block. Math defined in this way is supported on Sphinx’s standard builders with the help of other Sphinx-provided math extensions.
Recommended options for math¶
Ensure the sphinx.ext.imgmath extension is added to the documentation’s extension list:
extensions = [
'sphinx.ext.imgmath',
'sphinxcontrib.confluencebuilder',
]
If loading the sphinx.ext.imgmath extension conflicts with other builders, the extension can be optionally included using an approach such as follows (but may require additional changes depending on the environment):
import sys
extensions = [
'sphinxcontrib.confluencebuilder',
]
if any('confluence' in arg for arg in sys.argv):
extensions.append('sphinx.ext.imgmath')
The following are the recommended options to use:
imgmath_font_size = 14
imgmath_image_format = 'svg'
imgmath_use_preview = True
This configures the generated font size commonly observed on Confluence instances, hints that images are generated into SVG images (for ideal image scaling) and attempt to process the “depth” of an image to better align content alongside text.
Support for LaTeX macros for math¶
Note
This section outlines how users can take advantage of LaTeX macros enabled on their Confluence instance. The Confluence builder extension only helps forward LaTeX-generated content directly into macros. How a LaTeX macro decides to handle/render LaTeX content is up to the provider supporting the macro.
Note
Not all LaTeX macros support block and inline macros (normally, just the former).
Note
Confluence builder will attempt to support numbered equations by adding a floating label alongside a rendered math block. The variety of LaTeX macros which exist and limitations in how LaTeX macros are structured in a page may prevent the ability to perfectly align these labels alongside the rendered math content.
A stock Confluence instance does not provide LaTeX support. This is the main reason why the Confluence builder extension promotes the use of sphinx.ext.imgmath. However, if a user’s Confluence instance supports a marketplace add-on which provides LaTeX macro support, math content can instead be injected into these macros instead.
To use a LaTeX macro, the confluence_latex_macro
(ref) configuration option can be used. This
option accepts either the name of a macro to use or a dictionary of macro
options to consider (the dictionary is for more complex configurations such as
when attempting to support block-specific and inlined-specific macros). For
example, to specify the macro to use for any LaTeX content, the following
can be used:
confluence_latex_macro = 'macro-name'
If an environment supports a macro which supports block and inlined content in different macros, the following can be used:
confluence_latex_macro = {
'block-macro': 'block-macro-name',
'inline-macro': 'inline-macro-name',
'inline-macro-param': 'inline-macro-parameter', # (optional)
}
LaTeX macro names¶
What macro names to use will vary based off which macro types are installed (if any). Please see the following table for reported macro names:
Marketplace Application |
Configuration |
---|---|
Content Formatting Macros for Confluence |
confluence_latex_macro = 'latex-formatting'
|
LaTeX for Confluence |
confluence_latex_macro = 'orah-latex'
|
LaTeX Math |
confluence_latex_macro = {
'block-macro': 'mathblock',
'inline-macro': 'mathinline',
'inline-macro-param': 'body',
}
|
If a Confluence environment supports a different macro type, a user can determine the name of the macro by:
Creating a new page on the Confluence instance
Adding a LaTeX macro on the page and saving
Selecting the page’s option menu and selecting “View Storage format”
Look for the corresponding macro name inside an
ac:name
attribute (in this case, the macro’s name ismy-latex-macro
):<ac:structured-macro ac:name="my-latex-macro" ...> ... </ac:structured-macro>
Publishing with CI¶
Note
If running in a tox
/virtualenv
setup, ensure any environment
variables used are configured to be passed through to the virtual
environment.
Caution
It is never recommended to store an API token or raw password into a committed/shared repository holding documentation. This guide should help ensure this is not required for users.
Documentation can be published automatically through a CI system. While users may wish to customize a publish location or tweak title postfixes for a job, in almost all cases, the most important options to configure are specific to authentication (i.e. how to properly use a token to publish content without embedded the token into source). The following will focus on how to properly forward a token into a Sphinx configuration to allow publishing. The same approach can be used for tailoring other Confluence configuration entries in a CI environment.
There are three approaches that can be used to help accept a CI managed publish token:
Defining an environment variable to forward into the extension.
Override a configuration option when invoking a Sphinx build.
Adding the ability to fetch configuration values from the environment or file with tweaks to a
conf.py
definition.
Before demonstrating these methods, please note which type of authentication
is required for the target Confluence instance. For example, if
authenticating with an API key (Confluence Cloud; see API tokens), users
will need to configure both confluence_server_user
(ref) and confluence_server_pass
(ref) options. However, if using a personal
access token (see Using Personal Access Tokens), users will need to
configure only the confluence_publish_token
(ref) option.
Confluence environment variables¶
New in version 1.9.
The Confluence builder extension accepts most configuration entries from the
environment if the option is not already set in conf.py
.
Confluence Cloud API Key¶
If using a Confluence Cloud API key, ensure both the following variables are
not set inside conf.py
:
confluence_publish_token
confluence_server_pass
The option confluence_server_user
may be set if a user will only ever be
published with a single API token. If the environment plans to use multiple
tokens, ensure confluence_server_user
is not set as well.
Next, if the CI environment supports defining custom CI variables, create a
new entry for CONFLUENCE_SERVER_PASS
, holding the API token value to use
when publishing. If the API token is stored in another manner that can be
exposed when running a build, ensure the token is set into a
CONFLUENCE_SERVER_PASS
environment variable before running Sphinx. For
example:
$ export CONFLUENCE_SERVER_PASS="<my-token-value>"
$ sphinx-build ...
Running Sphinx
...
Or, when using a Windows command line:
> set CONFLUENCE_SERVER_PASS="<my-token-value>"
> sphinx-build ...
Running Sphinx
...
The same applies to CONFLUENCE_SERVER_USER
if the username field needs to
be set.
Confluence Data Center PAT¶
If using a PAT, ensure the following variables are not set inside
conf.py
:
confluence_publish_token
confluence_server_pass
confluence_server_user
Next, if the CI environment supports defining custom CI variables, create a
new entry for CONFLUENCE_PUBLISH_TOKEN
, holding the PAT value to use
when publishing. If the PAT is stored in another manner that can be exposed
when running a build, ensure the token is set into a
CONFLUENCE_PUBLISH_TOKEN
environment variable before running Sphinx. For
example:
$ export CONFLUENCE_PUBLISH_TOKEN="<my-token-value>"
$ sphinx-build ...
Running Sphinx
...
Or, when using a Windows command line:
> set CONFLUENCE_PUBLISH_TOKEN="<my-token-value>"
> sphinx-build ...
Running Sphinx
...
Configuration overrides¶
Sphinx supports providing configuration overrides from the command line.
Confluence Cloud API Key¶
The following can be used to configure an API token for Confluence Cloud:
sphinx-build ... -Dconfluence_server_pass="<my-token-value>"
Confluence Data Center PAT¶
For an environment using a PAT for Confluence Data Center, a PAT can be configured as follows:
sphinx-build ... -Dconfluence_publish_token="<my-token-value>"
Manual configuration processing¶
Users are free to use custom implementation inside their conf.py
file
to help manage their configuration in a CI environment. The following shows
two examples that read an environment variable SECRET_KEY
prepared
in a CI environment to be used for authentication.
Confluence Cloud API Key¶
If using an API token, the following can be used:
import os
...
confluence_server_user = 'api-key-uid'
confluence_server_pass = os.getenv('SECRET_KEY')
Confluence Data Center PAT¶
If using a personal access token, the following can be used:
import os
...
confluence_publish_token = os.getenv('SECRET_KEY')
Advanced¶
Publishing permissions¶
An account used for authentication will have the best experience with the following permissions when attempting to publish to a configured space:
Space – View
Page – Add, Delete
Attachments – Add, Delete
Delete permissions are only required for environments using the
confluence_cleanup_purge
(ref)
capabilitity.
For environments using an OAuth connector, the following scopes are required:
delete:content:confluence
read:content-details:confluence
write:attachment:confluence
write:content:confluence
write:watcher:confluence
Wiping a space¶
Danger
Pages removed from this call cannot be recovered without the help of an administrator for the Confluence space which pages will be removed from.
A command line argument wipe
is available for users wishing to remove pages
from a configured space. This can be useful for users who need to clear multiple
pages which have been pushed through automation or if the Confluence instance
does not support automatically deleting page children.
A wipe request can be started using the following:
$ python -m sphinxcontrib.confluencebuilder wipe --danger
...
Are you sure you want to continue? [y/N] y
URL: https://intranet-wiki.example.com/
Space: TEST
Pages: All Pages
Total pages: 250
Are you sure you want to REMOVE these pages? [y/N] y
Removing pages.... done
If a user wishes to only remove child pages of a
configured parent page, the option --parent
can be used:
python -m sphinxcontrib.confluencebuilder wipe --danger --parent
Changelog¶
2.5.1 (2024-04-06)¶
Fixed issue in Confluence REST v2 API usage (Cloud) where edited pages on Confluence prevented this extension from publishing updates
2.5.0 (2024-03-31)¶
Confluence card directives/roles can be processed with
linkcheck
Fixed issue where an exception could throw without cleanup options set
Fixed issue where anchor links may fail to work for v2 editor pages
Fixed issue where generated pages would use incorrect template with an explicit v1 editor
Fixed issue where index/search pages on v1 do not respect width configuration
Fixed regression where math label anchors would not be created in v1 editor
Fixed regression where search pages would not be set with a proper space key
Improve search box alignment on generated search pages
Initial support for using Confluence REST v2 API (Cloud)
Provide extended debugging options for publish events
Replacing
confluence_publish_disable_api_prefix
with a new optionconfluence_publish_override_api_prefix
Simplify autodocs rendering in v2 to make it somewhat usable
Support custom page notice via
confluence_page_generation_notice
2.4.0 (2023-12-14)¶
Fixed anchor links between various editor versions and when using MyST
Fixed issue when using markup in captions when using the v2 editor
Fixed issue with an editor metadata override may led to unexpected page styles
Fixed issue with dry-run reporting pages when configure root does not exist
Fixed regression in processing metadata directives on a page
Prevent undesired spacing when adding targets in paragraphs with v2 editor
Support width hints in v2 editor for CSV tables
2.3.0 (2023-09-09)¶
(note) Final release supporting Python 3.7 (EOL)
Fixed issue when a project defines a relative CA certificate path
Fixed issue when a project defines relative publish list files
Fixed issue where cleanup would remove up-to-date pages on rebuilds
Fixed triggering rebuilds when select configuration options change
Fixed select directive/role issues with Sphinx 7.2.x
2.2.0 (2023-07-22)¶
Fixed
confluence_full_width
issues on Confluence server/DCFixed issue where using
confluence_full_width
breaks an editor selectionFixed re-publishing issues when certain options change (e.g. parent page)
Improve support when using the sphinxcontrib-video extension
Introduce the
confluence_permit_raw_html
optionProvide quirk for CDATA issues on Confluence 8.0.x to 8.2.x
Support configuring the theme on generated code block macros
Support page-specific editor and full-width overrides
Support page-specific parent identifier overrides when publishing
2.1.1 (2023-05-19)¶
Ensure source distribution includes the
LICENSE
documentFixed issue where v2 editor may fail with
object has no attribute
error
2.1.0 (2023-05-15)¶
Allow users to configure legacy page search mode for cleanup
Fixed anchor page links with v2 editor
Fixed document processing issues with Sphinx 6.1.x
Improve rendering when using sphinxcontrib-needs extension
Introduce Confluence Smart link directives/roles
Introduce the Confluence strike role
Perform an attachment re-upload attempt on an unexpected Confluence 503 error
Provide fallback styling for code languages with a similar style
Support Codeberg helper for source links
Support
confluence_full_width
with v1 editorSupport default-fallback when using
confluence_lang_transform
Support deployment with Python 3.12
Support publishing only pages with content changes
Support suppressing extension warnings using Sphinx’s
suppress_warnings
Support the ability to configure where orphan pages are stored
Support the ability to not publish orphan pages
2.0.0 (2023-01-02)¶
Fixed issue publishing orphan pages when a publish root is configured
Fixed issue where captioned code blocks may not be numbered with
numfig
Fixed issue where captioned tables were not be numbered with
numfig
Hierarchy mode is now enabled by default
Improve look of quote-like directives
Introduce the Confluence excerpt (macro) directives
Support Confluence Cloud’s “Fabric” (v2) editor
Support collapsible code blocks
Support for Python 2.7 has been dropped
Support for
confluence_max_doc_depth
has been droppedSupport no publishing with an empty
confluence_publish_allowlist
1.9.0 (2022-08-21)¶
(note) Final release supporting Python 2.7
Allow
confluence_ca_cert
to accept a CA-bundle pathDefault publish Intersphinx databases to root documents
Fixed issue where code blocks may not properly render captions
Fixed issue where dry-runs may fail with a non-existent root page
Fixed issue where external references with ampersands would fail to publish
Fixed issue where labels are missing on first-publish on Confluence server
Fixed issue where title length limits were not properly enforced
Improve support for loading local windows CA/root certificates for requests
Introduce the Confluence emoticon (macro) role
Introduce the Confluence status (macro) role
Introduce the Confluence toc (macro) directive
Introduce the Confluence user mention (macro) role
Relax domain restrictions for Intersphinx generation
Support
confluence_parent_page
to accept a page identifierSupport archiving legacy pages (alternative to purging)
Support configuring configuration options from environment
Support document-specific reproducible hash injection in a postfix
Support jinja2 templating on header/footer templates
Support the ability to disable injecting
rest/api
in API endpoint url
1.8.0 (2022-03-27)¶
(note)
confluence_max_doc_depth
support is deprecated (reminder)(note) (advanced mode) Macro disabling is deprecated
Add configuration for personal access tokens (to avoid header entry changes)
Fixed issue where Confluence cloud did not update homepage on a personal space
Fixed issue where inline internal targets would create an empty link label
Fixed issue where Jira directives/role could not be substituted
Improve formatting when processing autodoc content (containers)
Improve support when using the sphinx-diagrams extension
Improve table-alignment for markdown
Introduce the latex directive/role
removed informational macro styling on figures
Support rate limiting for publish requests
Support setting the comment field in page update events
Support users to render math through available marketplace latex macros
1.7.1 (2021-11-30)¶
Fixed regression where publish-root/dryrun modes would fail with an exception
1.7.0 (2021-11-21)¶
(note)
confluence_max_doc_depth
support is deprecated (reminder)confluence_space_name
renamed toconfluence_space_key
Brackets will be wrapped around bottom footnote entries
Fixed issue where links to numbered section would not work
Fixed issue where publishing could fail without a proxy set for older requests
Fixed issue where report/wipe commands would fail in Python 2.7
Fixed regression in timeout option
Improve dry-run reflecting new attachments to be published
Improve indentations for line-block content
Improve support for attached SVG images with length/scaling modifiers
Improve support for non-pixel length units for images
Improve support for SVG images without an XML declaration
Improve support when publishing page updates converted to a new editor
Improve support when using the sphinx-gallery extension
Improve support when using the sphinx_toolbox extension
Improve support when using the sphinxcontrib-mermaid extension
Improve support when using the sphinxcontrib-needs extension
Improve support when using the sphinxcontrib-youtube extension
Improve user feedback on ancestor page update failures (500 errors)
Improved support for dealing with unreconciled page detections
Introduce the Jira role
Introduce the newline directive
Introduce the page generation notice option (notice for top of documents)
Introduce the source link option (e.g. “Edit Source” link)
Prevent issues with extension directives causing errors with other builders
Provide a configuration hook to override requests session information
Remove borders on footnote tables
Support domain indices generation/processing
Support for leaving resolved toctrees for singleconfluence
Support genindex generation/processing
Support search generation
Support strikethrough through strike role
Support the consideration of
confluence_parent_page
for wipe requests
1.6.0 (2021-09-26)¶
(note)
confluence_max_doc_depth
support is deprecatedconfluence_master_homepage
renamed toconfluence_root_homepage
confluence_purge_from_master
renamed toconfluence_purge_from_root
Always publish without XSRF checks (minimize Confluence instance logging)
Always strip control characters from content
Ensure publish events use legacy editor
Fixed issue where
sphinx.ext.imgmath
was forced for non-Confluence buildsFixed issue where rubrics were built as headers and not titled paragraphs
Handle extensions providing Unicode attributes (e.g.
sphinxcontrib.drawio
)Improve formatting when processing markdown content
Prevent exceptions where third-party extensions provide invalid image uris
Support rendering explicit newline entries
1.5.0 (2021-05-25)¶
Fixed issue where this extension conflicts with docutils’s translator attribs
Fixed issue with
:doc:<>
references when using singlebuilderFixed issue with alignment changes in newer Sphinx
Fixed issue with caption/title changes in newer docutils/Sphinx
Fixed issue with singlebuilder processing assets
Fixed issue with table width hints using pixels instead of percentages
Improvements for getpass handling in msystem-environments
Support an explicit root page publishing option
Support custom headers for REST calls
1.4.0 (2021-01-17)¶
Fixed issue where a meta node directive would fail the writer stage
Fixed issue where intersphinx would fail in Python 2.7
Fixed issue where not all math directive content would be accepted
Fixed/improved handling of configuration options from command line
Support for math visual depth adjustments (line alignment)
Support for numerical figures and references to these figures
Support late image/download processing (for third-party extensions)
1.3.0 (2020-12-31)¶
(note) Support for Sphinx v1.[6-7] has been dropped
(note) Support for XML-RPC has been dropped
Conflicting titles will be automatically adjusted to prevent publishing issues
Enable page-specific title overrides via confluence_title_overrides
Ensure configured title postfix is not trimmed in long titles
Extend language mappings for supported storage format language types
Fixed a series of scenarios where titles/missing images will fail a build
Fixed indentation to consistent offset for newer Confluence instances
Fixed issue when building heading which reference another document
Fixed issue when processing a download role with a url
Fixed issue where an anchor target may not generate a proper link
Fixed issue where ask options would fail in Python 2.7
Fixed issue where ask options would prompt when not publishing
Fixed issue where autosummary registration may fail
Fixed issue where default alignment did not apply to a figure’s legend
Fixed issue where empty pages could not be published
Fixed issue where links to headers which contain a link would fail
Fixed issue where literal-marked includes would fail to publish
Fixed issue where registering this extension caused issues with other builders
Fixed issue where todo entries would render when disabled in configuration
Fixed issue with previous-next links not generated for nested pages
Improved built references by including title (alt) data if set
Improved code macros rendering a title value when a caption is set
Improved emphasis handling for autodocs content
Improved figure/section numbering
Improved handling unknown code languages to none-styled (instead of Python)
Improved previous-next button visualization
Improved publishing when dealing with changing page title casing
Introduce the expand directive
Introduce the report command line feature
Introduce the wipe command line feature
Promote
confluence_storage
overconfluence
for raw typeSupport
:stub-columns:
option in a list-table directiveSupport disabling titlefix on an index page
Support for assigning Confluence labels for pages
Support for both allow and deny lists for published documents
Support for centered directive
Support for graphviz extension
Support for hlist directive
Support for inheritance-diagram extension
Support image candidate detection of extra image types for custom instances
Support publish dry runs
Support single-page builder
Support the
:backlinks:
option for contents directiveSupport the generation of an inventory file (for intersphinx)
Support users overriding default alignment
Support users to force standalone hosting of shared assets
Support width hints for tables
1.2.0 (2020-01-03)¶
(note) Sphinx v1.[6-7] support for this extension is deprecated
(note) XML-RPC support for this extension is deprecated
Fixed issue when using hierarchy on Sphinx 2.1+ (new citations domain)
Fixed issue with document names with path separators for windows users
Fixed issue with multi-line description signatures (e.g. C++ autodocs)
Fixed issue with processing hidden toctrees
Fixed issue with Unicode paths with
confluence_publish_subset
and Python 2.7Improved formatting for option list arguments
Improved handling and feedback when configured with incorrect publish instance
Improved name management for published assets
Improved reference linking for Sphinx domains capability (meth, attr, etc.)
Introduce a series of Jira directives
Support
firstline
parameter in the code block macroSupport base admonition directive
Support Confluence 7 series newline management
Support default alignment in Sphinx 2.1+
Support document postfixes
Support for generated image assets (asterisk marked)
Support passthrough authentication handlers for REST calls
Support previous/next navigation
Support prompting for publish username
Support
sphinx.ext.autosummary
extensionSupport
sphinx.ext.todo
extensionSupport the math directive
Support toctree’s numbered option
Support users injecting cookie data (for authentication) into REST calls
1.1.0 (2019-03-16)¶
Repackaged release (see sphinx-contrib/confluencebuilder#192)
1.0.0 (2019-03-14)¶
All Confluence-based macros can be restricted by the user
Block quotes with attribution are styled with Confluence quotes
Citations/footnotes now have back references
Enumerated lists now support various styling types
Fixed issue with enumerated lists breaking build on older Sphinx versions
Fixed issue with relative-provided header/footer assets
Fixed issues where table-of-contents may generate broken links
Improve support with interaction with other extensions
Improved paragraph indentation
Initial autodoc support
Nested tables and spanning cells are now supported
Provide option for a caller to request a password for publishing documents
Storage format support (two-pass publishing no longer needed)
Support for sass/yaml language types
Support parsed literal content
Support publishing subset of documents
Support the download directive
Support the image/figure directives
Support the manpage role
0.9.0 (2018-06-02)¶
Fixed a series of content escaping issues
Fixed an issue when purging content would remove just-published pages
Fixed detailed configuration errors from being hidden
Improve proxy support for XML-RPC on various Python versions
Improve support for various Confluence URL configurations
Improve support in handling literal block languages
Support automatic title generation for documents (if missing)
Support
:linenothreshold:
option for highlight directiveSupport maximum page depth (nesting documents)
Support the raw directive
Support two-way SSL connections
0.8.0 (2017-12-05)¶
Fix case where first-publish with
confluence_master_homepage
fails to configure the space’s homepageSupport page hierarchy
Improve PyPI cover notes
0.7.0 (2017-11-30)¶
Cap headers/sections to six levels for improved visualization
Fixed REST publishing for encoding issues and Python 3.x (< 3.6) issues
Improve markup for:
Body element lists
Citations
Definitions
Footnotes
Inline literals
Literal block (code)
Rubric
Seealso
Table
Versionmodified
Re-work generated document references/targets (reference to section names)
Sanitize output to prevent Confluence errors for certain characters
Support indentations markup
Support
master_doc
option to configure space’s homepageSupport removing document titles from page outputs
Support silent page updates
0.6.0 (2017-04-23)¶
Cleanup module’s structure, versions and other minor files
Drop
confluence
PyPI package (embedded XML-RPC support added)Improve hyperlink and cross-referencing arbitrary locations/documents support
Improve proxy support
Re-support Python 3.x series
Support anonymous publishing
Support REST API
0.5.0 (2017-03-31)¶
(note) Known issues with Python 3.3, 3.4, 3.5 or 3.6 (see sphinx-contrib/confluencebuilder#10)
Header/footer support
Purging support
Use macros for admonitions
0.4.0 (2017-02-21)¶
Move from
Confluence
PyPI package to aconfluence
PyPI package (required for publishing to PyPI; see pycontribs/confluence)
0.3.0 (2017-01-22)¶
Adding Travis CI, tox and initial unit testing
Module now depends on
future
Providing initial support for Python 3
0.2.0 (2016-07-13)¶
Moved configuration to the Sphinx config
0.1.1 (2016-07-12)¶
Added table support
Fixed internal links
0.1.0 (2016-07-12)¶
Added lists, bullets, formatted text
Added headings and titles