### Ubuntu (virtualenv) setup and install Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install-virtualenv.rst Install Python and virtualenv using apt-get (with a dnf command for virtualenv), create and activate the virtual environment, install the package, and verify the version. The expected output is 'sphinxcontrib.confluencebuilder '. ```shell-session $ sudo apt-get update $ sudo apt-get install python-pip $ sudo dnf install python-virtualenv $ virtualenv sphinx-venv $ source sphinx-venv/bin/activate $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### OS X (virtualenv) setup and install Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install-virtualenv.rst Install pip and virtualenv using easy_install, create and activate the virtual environment, install the package, and verify the version. The expected output is 'sphinxcontrib.confluencebuilder '. ```shell-session $ sudo easy_install pip $ pip install virtualenv $ virtualenv sphinx-venv $ source sphinx-venv/bin/activate $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Fedora (virtualenv) setup and install Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install-virtualenv.rst Install Python and virtualenv using dnf, create and activate the virtual environment, install the package, and verify the version. The expected output is 'sphinxcontrib.confluencebuilder '. ```shell-session $ sudo dnf install python-pip $ sudo dnf install python-virtualenv $ virtualenv sphinx-venv $ source sphinx-venv/bin/activate $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Arch (virtualenv) setup and install Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install-virtualenv.rst Install Python, pip, and virtualenv using pacman, create an activation script, install the package, and verify the version. The expected output is 'sphinxcontrib.confluencebuilder '. ```shell-session $ sudo pacman -Sy $ sudo pacman -S python-pip $ sudo pacman -S python-virtualenv $ virtualenv sphinx-venv $ source sphinx-venv/bin/activate $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Example tenant_info URL Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/guide-scope-token.rst Example URL showing how to access the tenant info page for a space named 'example'. ```none https://example.atlassian.net/_edge/tenant_info ``` -------------------------------- ### Install sphinxcontrib-confluencebuilder on Windows Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Installation steps for Windows command prompt. Assumes Python is available in the PATH. Uses python -m pip to install and then verifies the installation. ```doscon > python -m pip install sphinxcontrib-confluencebuilder > python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install sphinxcontrib-confluencebuilder on OS X Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Installation steps for OS X. Uses sudo easy_install pip, then pip to install the package. The final command verifies the installation and outputs the version. ```shell-session $ sudo easy_install pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install on Ubuntu Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Commands to install dependencies and the package on Ubuntu. ```shell-session $ sudo apt-get update $ sudo apt-get install python-pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install sphinxcontrib-confluencebuilder on Ubuntu Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Platform-specific installation steps for Ubuntu. Uses apt-get to update and install python-pip, then pip to install the package. The final command verifies the installation and outputs the version. ```shell-session $ sudo apt-get update $ sudo apt-get install python-pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install on Fedora Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Commands to install dependencies and the package on Fedora. ```shell-session $ sudo dnf install python-pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install via pip Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Use pip to install or upgrade the package. ```shell pip install -U sphinxcontrib-confluencebuilder (or) python -m pip install -U sphinxcontrib-confluencebuilder ``` -------------------------------- ### Install sphinxcontrib-confluencebuilder on Fedora Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Platform-specific installation steps for Fedora. Uses dnf to install python-pip, then pip to install the package. The final command verifies the installation and outputs the version. ```shell-session $ sudo dnf install python-pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install development version Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Install the latest source code directly from the repository. ```shell pip install git+https://github.com/sphinx-contrib/confluencebuilder.git ``` -------------------------------- ### Install sphinxcontrib-confluencebuilder on Arch Linux Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Platform-specific installation steps for Arch Linux. Uses pacman to install python-pip, then pip to install the package. The final command verifies the installation and outputs the version. ```shell-session $ sudo pacman -Sy $ sudo pacman -S python-pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Install on Windows Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Commands to install and verify the package on Windows. ```doscon > python -m pip install sphinxcontrib-confluencebuilder > python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Confluence Cloud Wiki URL Example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/configuration.rst Example of a standard Confluence Cloud Wiki URL. ```none https://example.atlassian.net/wiki/ ``` -------------------------------- ### Verify installation Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Check the installed version of the package. ```shell python -m sphinxcontrib.confluencebuilder --version ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/next-prev/advanced-extensions.md Initializes the start of a storage format plain-text-link-body element. Returns content that starts an ac:plain-text-link-body element. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format plain-text-link-body element. The ac:plain-text-link-body element will be initialized. This method may use provided node to tweak the final content. This call should be used with a respective end_ac_plain_text_link_body_macro() call. ### Parameters - **node** - The node processing the macro ### Returns The content ``` -------------------------------- ### start_ac_plain_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-click/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content that starts an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format plain-text-body element. The `ac:plain-text-body` element will be initialized. This method may use provided `node` to tweak the final content. This call should be used with a respective `end_ac_plain_text_body_macro()` call. ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### start_ac_plain_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/next-prev/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content that starts an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format plain-text-body element. The ac:plain-text-body element will be initialized. This method may use provided node to tweak the final content. This call should be used with a respective end_ac_plain_text_body_macro() call. ### Parameters - **node** - The node processing the macro ### Returns The content ``` -------------------------------- ### Install on OS X Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Commands to install pip and the package on OS X. ```shell-session $ sudo easy_install pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### Example allowed-docs.txt content Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/configuration.md Example content for the file referenced by confluence_publish_allowlist. Lists document names without extensions. ```text index foo/bar ``` -------------------------------- ### Sphinx seealso directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/seealso.md Example markup for the Sphinx seealso directive, showing how to reference a module and an external manual link. ```none .. seealso:: Module `other` Documentation of the `other` module. `Other Manual `_ Manual for another reference related to this content. ``` -------------------------------- ### Install bleeding-edge sphinxcontrib-confluencebuilder from git Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Development installation using pip to install directly from the git repository. ```shell pip install git+https://github.com/sphinx-contrib/confluencebuilder.git ``` -------------------------------- ### Install on Arch Linux Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install.rst Commands to install dependencies and the package on Arch Linux. ```shell-session $ sudo pacman -Sy $ sudo pacman -S python-pip $ pip install sphinxcontrib-confluencebuilder $ python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-click/advanced-extensions.md Initializes the start of a storage format plain-text-body element for links. Returns content that starts an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format plain-text-body element. The `ac:plain-text-body` element will be initialized. This method may use provided `node` to tweak the final content. This call should be used with a respective `end_ac_plain_text_link_body_macro()` call. ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### Example denied-docs.txt content Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/latex/configuration.md Example content for the file referenced by confluence_publish_denylist. Lists document names to deny. ```text index foo/bar ``` -------------------------------- ### Install sphinxcontrib-confluencebuilder via pip Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/README.md Use pip to install the extension package. ```shell pip install sphinxcontrib-confluencebuilder (or) python -m pip install sphinxcontrib-confluencebuilder ``` -------------------------------- ### Initialize Sphinx project with quick-start Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/tutorial.rst Commands to initialize a new Sphinx project using the quick-start utility. ```shell sphinx-quickstart (or) python -m sphinx.cmd.quickstart (or) python -m sphinx.quickstart ``` -------------------------------- ### Set modern API endpoint with GUID (template and example) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/kroki/guide-scope-token.md Required for scoped tokens. Replace with the Cloud identifier from tenant_info. The example shows a GUID placeholder and a real GUID format. ```python confluence_server_url = 'https://api.atlassian.com/ex/confluence//' ``` ```python confluence_server_url = 'https://api.atlassian.com/ex/confluence/550e8400-e29b-41d4-a716-446655440000/' ``` -------------------------------- ### Example confluence_server_url with GUID Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/guide-scope-token.rst Example configuration using a sample GUID (550e8400-e29b-41d4-a716-446655440000) for the modern API endpoint. ```python confluence_server_url = 'https://api.atlassian.com/ex/confluence/550e8400-e29b-41d4-a716-446655440000/' ``` -------------------------------- ### Example mention role usage Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/markdown-myst/configuration.md A reStructuredText example showing how to reference a configured mention key in a document. ```rst For more information, contact :confluence_mention:`myuser`. ``` -------------------------------- ### GET /users/(*int:* user_id)/posts/(tag) - Example Response Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/httpdomain/index.rst Example HTTP response for the GET posts request, returning a JSON array of posts. The response includes status 200 OK and Content-Type text/javascript. ```http HTTP/1.1 200 OK Vary: Accept Content-Type: text/javascript [ { "post_id": 12345, "author_id": 123, "tags": ["server", "web"], "subject": "I tried Nginx" }, { "post_id": 12346, "author_id": 123, "tags": ["html5", "standards", "web"], "subject": "We go to HTML 5" } ] ``` -------------------------------- ### Configure modern API endpoint with GUID Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/confluence-card/guide-scope-token.md Set the server URL to the modern Confluence API endpoint using the space's GUID. The example shows a placeholder and a concrete GUID. ```python confluence_server_url = 'https://api.atlassian.com/ex/confluence//' ``` ```python confluence_server_url = 'https://api.atlassian.com/ex/confluence/550e8400-e29b-41d4-a716-446655440000/' ``` -------------------------------- ### Minimal Confluence Configuration Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/configuration.rst A minimal configuration setup for Confluence publishing. ```python extensions = [ 'sphinxcontrib.confluencebuilder', ] confluence_publish = True confluence_space_key = 'MYPRJ' confluence_server_url = 'https://wiki.example.com/' confluence_parent_page = 'Documentation' ``` -------------------------------- ### Sphinx quick-start commands Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/httpdomain/tutorial.md Run any of these commands in the terminal to start a new Sphinx documentation project. ```shell sphinx-quickstart (or) python -m sphinx.cmd.quickstart (or) python -m sphinx.quickstart ``` -------------------------------- ### start_ac_rich_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-click/advanced-extensions.md Initializes the start of a storage format rich-text-body element. Returns content that starts an ac:rich-text-body element. ```APIDOC ## start_ac_rich_text_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format rich-text-body element. The `ac:rich-text-body` element will be initialized. This method may use provided `node` to tweak the final content. This call should be used with a respective `end_ac_rich_text_body_macro()` call. ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### start_adf_content(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-click/advanced-extensions.md Initializes the start of a storage format adf-content element. Returns content that starts an ac:adf-content element. ```APIDOC ## start_adf_content(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-content element. The `ac:adf-content` element will be initialized. This method may use provided `node` to tweak the final content. This call should be used with a respective `end_adf_content()` call. ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### start_ac_rich_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/next-prev/advanced-extensions.md Initializes the start of a storage format rich-text-body element. Returns content that starts an ac:rich-text-body element. ```APIDOC ## start_ac_rich_text_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format rich-text-body element. The ac:rich-text-body element will be initialized. This method may use provided node to tweak the final content. This call should be used with a respective end_ac_rich_text_body_macro() call. ### Parameters - **node** - The node processing the macro ### Returns The content ``` -------------------------------- ### start_adf_content(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/next-prev/advanced-extensions.md Initializes the start of a storage format adf-content element. Returns content that starts an ac:adf-content element. ```APIDOC ## start_adf_content(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-content element. The ac:adf-content element will be initialized. This method may use provided node to tweak the final content. This call should be used with a respective end_adf_content() call. ### Parameters - **node** - The node processing the macro ### Returns The content ``` -------------------------------- ### Line block markup example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/line-block.md Example reStructuredText line block markup. Use the vertical bar (|) to start each line; continuation lines are indented. The markup is rendered with a line break after each block. ```none | Lend us a couple of bob till Thursday. | I'm absolutely skint. | But I'm expecting a postal order and I can pay you back as soon as it comes. | Love, Ewan. ``` -------------------------------- ### Create minimalistic conf.py Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/tutorial.rst Initial content for a new conf.py file in a minimalistic setup. ```python extensions = [] ``` -------------------------------- ### GET /users/(*int:* user_id)/posts/(tag) - Example Request Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/httpdomain/index.rst Example HTTP request for retrieving posts by a user with a specific tag. The request includes headers Accept and Host. ```http GET /users/123/posts/web HTTP/1.1 Host: example.com Accept: application/json, text/javascript ``` -------------------------------- ### Line Block Markup Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/line-block.md Example of a line block in reStructuredText. Each line starts with a pipe (|) and subsequent lines are indented to continue the block. ```none | Lend us a couple of bob till Thursday. | I'm absolutely skint. | But I'm expecting a postal order and I can pay you back as soon as it comes. | Love, Ewan. ``` -------------------------------- ### sphinx-toolbox collapse directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/linkcode/guide-collapse.md Use the sphinx-toolbox collapse directive to manage collapsed content. This requires the sphinx-toolbox extension and is supported starting in version 1.7. ```rst .. collapse:: Details This paragraph should be collapsed. ``` -------------------------------- ### Container collapse class hint example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/linkcode/guide-collapse.md Apply the collapse class hint to a container directive to collapse its contents. This feature is supported for containers starting in version 2.1. ```rst .. container:: collapse This paragraph should be collapsed. ``` -------------------------------- ### Code block collapse class hint example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/linkcode/guide-collapse.md Use the collapse class hint on a code-block directive to collapse the code block. This feature is supported for code blocks starting in version 2.0. ```rst .. code-block:: python :class: collapse import example example.method() ``` -------------------------------- ### start_ac_plain_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/program-output/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content that sets up an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. Returns content that sets up an ac:plain-text-body element. ### Method start_ac_plain_text_body_macro ### Parameters - **node** - Required - The node processing the macro ### Returns The content ``` -------------------------------- ### Register custom node with Sphinx Confluence Builder Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/advanced-extensions.rst Example setup function that registers a custom node type with the 'confluence' keyword, along with visit and depart functions that wrap content in [pre] and [post] tags. ```python def setup(app): app.add_node( custom_node, confluence=(visit_custom_node, depart_custom_node), ) def visit_custom_node(self, node): self.body.append('[pre]') self.context.append('[post]') def depart_custom_node(self, node): self.body.append(self.context.pop()) ``` -------------------------------- ### hello-world JSON output Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-click/index.rst Example JSON output shown in the documentation for the hello-world command. ```text { "field1": "value1", "field2": "value2" } ``` -------------------------------- ### Inline and display math expressions Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/linkcode/math.md Examples of inline math ($A_\text{c} = (\pi/4) d^2$), display equation ($E = mc^2$), Euler identity with label, and multi-line equation array. Warning: Some math support may require LaTeX and dvipng/dvisvgm installations unless HTML or Marketplace macros are available. ```none The area of a circle is $A_\text{c} = (\pi/4) d^2$. ``` ```none $$ E = mc^2 $$ ``` ```none $$ e^{i\pi} + 1 = 0 $$ ``` ```none $$ \begin{eqnarray} y & = & ax^2 + bx + c \\ f(x) & = & x^2 + 2xy + y^2 \end{eqnarray} $$ ``` -------------------------------- ### Windows virtualenv installation commands Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/linkcode/install-virtualenv.md Commands to install virtualenv on Windows, create a virtual environment, activate it, install sphinxcontrib-confluencebuilder, and verify the installation. The first block installs virtualenv; the second block creates and activates the environment and installs the package. ```doscon > pip install virtualenv ``` ```doscon > virtualenv sphinx-venv > (or: python -m virtualenv sphinx-venv) > sphinx-venv\Scripts\activate.bat > python -m pip install sphinxcontrib-confluencebuilder > python -m sphinxcontrib.confluencebuilder --version sphinxcontrib.confluencebuilder ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/program-output/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content that sets up an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. Returns content that sets up an ac:plain-text-body element. ### Method start_ac_plain_text_link_body_macro ### Parameters - **node** - Required - The node processing the macro ### Returns The content ``` -------------------------------- ### Install and upgrade sphinxcontrib-confluencebuilder with pip Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/install.md Recommended installation or upgrade method using pip. The -U flag upgrades to the latest version. Alternative form uses python -m pip. ```shell pip install -U sphinxcontrib-confluencebuilder (or) python -m pip install -U sphinxcontrib-confluencebuilder ``` -------------------------------- ### start_tag(self, node, tag, suffix=None, empty=False, **kwargs) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/confluence-card/advanced-extensions.md Returns content that initializes the start of a storage format element (e.g., generates a start tag). The element type is specified by the 'tag' parameter and can be customized using the provided node and keyword arguments. ```APIDOC ## start_tag(self, node, tag, suffix=None, empty=False, **kwargs) ### Description Returns content that initializes the start of a storage format element (e.g., generates a start tag). The element type is specified by the 'tag' parameter and can be customized using the provided node and keyword arguments. ### Parameters - **node** (node) - Required - The node processing the start-tag - **tag** (str) - Required - The type of tag - **suffix** (str, optional) - The suffix to add (defaults to nothing) - **empty** (bool, optional) - Tag will not hold child nodes (defaults to False) - **kwargs** (dict, optional) - Dictionary of attributes to include in the tag ### Returns the content ### Example ```python def visit_custom_node(self, node): self.body.append(self.start_tag(node, 'p')) self.context.append(self.end_tag(node)) def depart_custom_node(self, node): self.body.append(self.context.pop()) ``` ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/image/advanced-extensions.md Helper method to initialize a storage format adf-extension element. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `start_adf_extension()` call. ### Parameters - **node** – the node processing the macro ### Returns the content ``` -------------------------------- ### todo directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/validation-sets/extensions/todo.rst Shows the syntax for creating a todo entry using the todo directive. Requires registering the sphinx.ext.todo extension and setting the todo_include_todos configuration option. ```none .. todo:: This is an example message. ``` -------------------------------- ### Publish Token Environment Variable Setup Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/configuration.rst Commands to set the publish token via environment variables. ```none export CONFLUENCE_PUBLISH_TOKEN=TOKEN (or) set CONFLUENCE_PUBLISH_TOKEN=TOKEN ``` -------------------------------- ### C# example with code-block directive Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/unit-tests/datasets/code-block/code-block-highlight.rst A C# console application example using the code-block directive. ```csharp using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("this is an example"); } } } ``` -------------------------------- ### start_ac_plain_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-tabs/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content to be appended to a document. ```APIDOC ## start_ac_plain_text_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. Returns content to be appended to a document. ### Method start_ac_plain_text_body_macro ### Parameters - **node** - Required - The node processing the macro ### Returns The content ``` -------------------------------- ### start_ac_plain_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/confluence-status/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content that begins an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. Returns content that begins an ac:plain-text-body element. ### Method start_ac_plain_text_body_macro ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### Environment Variable Token Setup Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/configuration.rst Commands to set the API token via environment variables for authentication. ```none export CONFLUENCE_API_TOKEN=TOKEN (or) set CONFLUENCE_API_TOKEN=TOKEN ``` -------------------------------- ### HTML example with code-block directive Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/unit-tests/datasets/code-block/code-block-highlight.rst An HTML page example with embedded JavaScript, shown after the highlight directive sets the default to html. ```html my-example this is an example ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-tabs/advanced-extensions.md Initializes the start of a storage format plain-text-body element. Returns content to be appended to a document. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. Returns content to be appended to a document. ### Method start_ac_plain_text_link_body_macro ### Parameters - **node** - Required - The node processing the macro ### Returns The content ``` -------------------------------- ### Confluence Cloud publish configuration Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/autodocs/configuration.md Example conf.py configuration for publishing to Confluence Cloud. Sets confluence_cloud to True and uses a server URL for a wiki.example.com instance. ```python extensions = [ 'sphinxcontrib.confluencebuilder', ] confluence_publish = True confluence_space_key = 'MYPRJ' confluence_server_url = 'https://wiki.example.com/' confluence_parent_page = 'Documentation' confluence_server_user = 'myawesomeuser@example.com' confluence_cloud = True ``` -------------------------------- ### SVG image example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/images.md Example of including an SVG image file. ```markdown ![image](assets/logo.svg) ``` -------------------------------- ### Production list markup example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/production-list.md Example markup for the Sphinx production list directive. The directive is used to define grammar productions. The example shows the syntax for try statements. ```none .. productionlist:: try_stmt: try1_stmt | try2_stmt try1_stmt: "try" ":" `suite` : ("except" [`expression` ["," `target`]] ":" `suite`)+ : ["else" ":" `suite`] : ["finally" ":" `suite`] try2_stmt: "try" ":" `suite` : "finally" ":" `suite` ``` -------------------------------- ### Create Minimalistic Sphinx Files Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/cleanup/tutorial.md Create an index.rst file and a basic conf.py configuration file for a new documentation project. ```rst My documentation ================ This is a test document. ``` ```python extensions = [] ``` -------------------------------- ### Figure directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/images.md Example of using the figure directive to add an image with a caption. ```markdown ![Confluence Logo](assets/confluence.png) ``` -------------------------------- ### start_adf_content(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/program-output/advanced-extensions.md Initializes the start of a storage format adf-content element. Returns content that sets up an ac:adf-content element. ```APIDOC ## start_adf_content(self, node) ### Description Initializes the start of a storage format adf-content element. Returns content that sets up an ac:adf-content element. ### Method start_adf_content ### Parameters - **node** - Required - The node processing the macro ### Returns The content ``` -------------------------------- ### Literal include example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/validation-sets/sphinx/code.rst A simple literal include example showing basic print functionality. ```default print('hello world') ``` -------------------------------- ### LaTeX macro names for marketplace applications Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/openapi/guide-math.md Configuration examples for different marketplace applications: Content Formatting Macros for Confluence, LaTeX for Confluence, and LaTeX Math. ```python confluence_latex_macro = 'latex-formatting' ``` ```python confluence_latex_macro = 'orah-latex' ``` ```python confluence_latex_macro = { 'block-macro': 'mathblock', 'inline-macro': 'mathinline', 'inline-macro-param': 'body', } ``` -------------------------------- ### Configure Confluence publishing settings Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/README.md Example configuration for enabling publishing and setting target space and server details in conf.py. ```python extensions = [ 'sphinxcontrib.confluencebuilder', ] confluence_publish = True confluence_space_key = 'TEST' confluence_parent_page = 'Documentation' confluence_server_url = 'https://intranet-wiki.example.com/' confluence_ask_user = True confluence_ask_password = True ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-data-viewer/advanced-extensions.md Initializes the start of a storage format adf-extension element. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `start_adf_extension()` call. ### Parameters - **node** – the node processing the macro ### Returns the content ``` -------------------------------- ### Confluence Cloud API Endpoint Example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/configuration.rst Example of the required API endpoint URL for Confluence Cloud. ```none https://api.atlassian.com/ex/confluence/550e8400-e29b-41d4-a716-446655440000/ ``` -------------------------------- ### Sphinx toctree directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/validation-sets/sphinx/index.rst Example of a Sphinx toctree directive with maxdepth option and three document entries. ```none .. toctree:: :maxdepth: 1 doca docb docc ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/strikethrough/advanced-extensions.md Initializes the start of a storage format plain-text-body element for links. Returns content to be appended to a document. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format plain-text-body element. The ac:plain-text-body element will be initialized. This method may use provided node to tweak the final content. This call should be used with a respective end_ac_plain_text_link_body_macro() call. ### Parameters - **node** - The node processing the macro ### Returns The content ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/advanced-extensions.md Initializes the start of a storage format plain-text-body element (`ac:plain-text-body`). Returns content to append to a document. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element (`ac:plain-text-body`). Returns content to append to a document. ### Method Helper method ### Parameters - **node** - The node processing the macro. ### Returns The content to append. ``` -------------------------------- ### reStructuredText note admonition example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/confluence-card/admonitions.md Example markup for a note admonition. The admonition is translated to a Confluence informative macro. ```none .. note:: This is a "note" block message. ``` -------------------------------- ### start_ac_rich_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/program-output/advanced-extensions.md Initializes the start of a storage format rich-text-body element. Returns content that sets up an ac:rich-text-body element. ```APIDOC ## start_ac_rich_text_body_macro(self, node) ### Description Initializes the start of a storage format rich-text-body element. Returns content that sets up an ac:rich-text-body element. ### Method start_ac_rich_text_body_macro ### Parameters - **node** - Required - The node processing the macro ### Returns The content ``` -------------------------------- ### Topic directive example markup Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/topic.md Example reStructuredText markup for the topic directive. The body is indented and interpreted as body elements. ```none .. topic:: Topic Title Subsequent indented lines comprise the body of the topic, and are interpreted as body elements. ``` -------------------------------- ### Pull-quote directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/pull-quote.md Example markup for the pull-quote directive. The directive is followed by the quoted text and an optional attribution line. ```none .. pull-quote:: No matter where you go, there you are. -- Buckaroo Banzai ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/autodocs/advanced-extensions.md Initializes the start of a storage format plain-text-body element. The ac:plain-text-body element will be initialized. This method may use the provided node to tweak the final content. Should be used with a respective end_ac_plain_text_link_body_macro() call. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. The ac:plain-text-body element will be initialized. This method may use the provided node to tweak the final content. Should be used with a respective end_ac_plain_text_link_body_macro() call. ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### reStructuredText image directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/autodocs/images.md Example markup for the reStructuredText image directive, which adds an image to a document. The image can be local, embedded via data URI, or external. This extension uses Confluence image formatting, and the example renders an image floating in the top-right of the page. ```none .. image:: assets/sphinx.png ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/blockdiag/advanced-extensions.md Initializes the start of a storage format plain-text-body element. The ac:plain-text-body element will be initialized. This method may use the provided node to tweak the final content. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format plain-text-body element. The `ac:plain-text-body` element will be initialized. This method may use provided `node` to tweak the final content. This call should be used with a respective `end_ac_plain_text_link_body_macro()` call. ### Parameters - **node** – the node processing the macro ### Returns the content ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-panels/advanced-extensions.md Initializes the start of a storage format plain-text-body element. The ac:plain-text-body element will be initialized. This method may use the provided node to tweak the final content. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element. The `ac:plain-text-body` element will be initialized. This method may use the provided node to tweak the final content. This call should be used with a respective `end_ac_plain_text_link_body_macro()` call. ### Parameters - **node** - The node processing the macro ### Returns The content ``` -------------------------------- ### Windows install virtualenv (as administrator) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/doc/install-virtualenv.rst Run this command in a Windows command prompt opened as administrator to install virtualenv using pip. ```doscon > pip install virtualenv ``` -------------------------------- ### Basic Confluence Cloud publish configuration Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/configuration.md Example conf.py for publishing to Confluence Cloud (https://example.atlassian.net/) with a parent page and user. Requires an API token set via the CONFLUENCE_API_TOKEN environment variable. ```python extensions = [ 'sphinxcontrib.confluencebuilder', ] confluence_publish = True confluence_space_key = 'MYPRJ' confluence_server_url = 'https://example.atlassian.net/' confluence_parent_page = 'Documentation' confluence_server_user = 'myawesomeuser@example.com' ``` ```none export CONFLUENCE_API_TOKEN=TOKEN (or) set CONFLUENCE_API_TOKEN=TOKEN ``` -------------------------------- ### confluence_metadata labels option example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/confluence-card/directives.md Applies a space-separated list of labels to a page. The example adds labels 'label-a' and 'label-b' to the document. ```rst .. confluence_metadata:: :labels: label-a label-b ``` -------------------------------- ### reStructuredText epigraph directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/admonitions/epigraph.md Example markup for the epigraph directive, which displays a quotation with an attribution. The output is a blockquote with the text and attribution. ```none .. epigraph:: No matter where you go, there you are. -- Buckaroo Banzai ``` -------------------------------- ### start_ac_plain_text_link_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/confluence-status/advanced-extensions.md Initializes the start of a storage format plain-text-body element for links. Returns content that begins an ac:plain-text-body element. ```APIDOC ## start_ac_plain_text_link_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element for links. Returns content that begins an ac:plain-text-body element. ### Method start_ac_plain_text_link_body_macro ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### start_ac_plain_text_body_macro(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/ipython/advanced-extensions.md Initializes the start of a storage format plain-text-body element (`ac:plain-text-body`). Returns content to append to a document. ```APIDOC ## start_ac_plain_text_body_macro(self, node) ### Description Initializes the start of a storage format plain-text-body element (`ac:plain-text-body`). Returns content to append to a document. ### Method Helper method ### Parameters - **node** - The node processing the macro. ### Returns The content to append. ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/inheritance-diagram/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(node) ### Description Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ### Method N/A (Python method) ### Endpoint N/A ### Parameters #### Parameters - **node** - The node processing the macro. ### Returns The content to be appended. ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/cleanup/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ### Method Helper method ### Parameters - **node** - Required - The node processing the macro ### Returns The content to append ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/program-output/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `start_adf_extension()` call. ### Parameters - **node** - The node processing the macro. ### Returns The content to append. ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-click/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `start_adf_extension()` call. ### Parameters - **node** – the node processing the macro ### Returns - the content ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-video/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `start_adf_extension()` call. ### Parameters - **node** - Required - the node processing the macro ### Returns the content ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/sphinx-tabs/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `start_adf_extension()` call. ### Parameters - **node** – the node processing the macro ### Returns - the content ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/tables/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ### Method start_adf_extension ### Parameters - **node** - The node processing the macro. ### Returns The content to append. ``` -------------------------------- ### start_adf_extension(self, node) Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/blockdiag/advanced-extensions.md Initializes the start of a storage format adf-extension element. Returns content to be appended to a document. ```APIDOC ## start_adf_extension(self, node) ### Description A helper used to return content to be appended to a document which initializes the start of a storage format adf-extension element. The `ac:adf-extension` element will be initialized. This call should be used with a respective `end_adf_extension()` call. ### Parameters - **node** - The node processing the macro. ### Returns The content. ``` -------------------------------- ### Doctest block example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/linkcode/doctest.md Example of a reStructuredText doctest block, showing an interactive Python session. The output is displayed in a separate code block. ```none >>> print 'this is a Doctest block' this is a Doctest block ``` ```pycon >>> print 'this is a Doctest block' this is a Doctest block ``` -------------------------------- ### reStructuredText sidebar directive example Source: https://github.com/sphinx-contrib/confluencebuilder/blob/main/tests/sample-sets/cleanup/sidebar.md Example reStructuredText markup for the sidebar directive, showing an optional title, optional subtitle, and the body content. ```none .. sidebar:: Optional Sidebar Title :subtitle: Optional Sidebar Subtitle Subsequent indented lines comprise the body of the sidebar, and are interpreted as body elements. ```