Include from GitLab to Confluence Cloud
Breadcrumbs

Include directory

You can include at once all the files of a specific directory (folder) from a GitLab repository in your Confluence page.


Add the macro

You can add the macro either by:

  • typing directly /GitLab Directory and ENTER to add and edit the macro.

  • using the Insert button from the editor toolbar and then picking the GitLab Directory macro from the “External Content” category of the macro library.

image-20230616-050752.png

You will then be prompted to specify the following:

URL

URL of the directory in a GitLab repository

Syntax highlighting

Format/ language for highlighting purposes (auto detect is performed by default)

Show line number

Tick to display number of lines in the file

Hide file header

Tick to hide file headers when files are rendered

Collapsible

Collapses the file content and gives the option to expand and collapse

Screenshot 2023-11-30 at 10.02.07.png
Including Directory from GitLab in Confluence
Screenshot 2023-11-30 at 10.02.34.png
Using Collapsible Config Parameter


For directories that are within private repositories, users will need to authenticate to view the files' content. More information in this section.