Skip to main content
Skip table of contents

Include directory

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


Add the macro

You can either:

  • type directly { Include GitHub Directory and ENTER to add and edit the macro, or

  • click in the editor toolbar on Insert > Other Macros and select the Include GitHub Directory macro (located in the category “External Content” of the macro library).

Select the GitHub Directory macro

You will then be prompted to specify the following:

URL

URL of the directory in a GitHub 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 header of files rendered

Collapsible

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

Specify the directory URL and edit the macro settings

For directories that are within private repositories, users will need to authenticate to view the files' content.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.