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 add the macro either by:
to add and edit the macro.using the Insert button from the editor toolbar and then picking the GitHub Directory macro from the “External Content” category of the macro library.
You will then be prompted to specify the following:
URL of the directory in a GitHub repository
Format/ language for highlighting purposes (auto detect is performed by default)
Tick to display number of lines in the file
Tick to hide file headers when files are rendered
Collapses the file content and gives the option to expand and collapse