Paste a gist link. Readers see the code on the page.
Paste a GitHub gist link onto a Confluence page and it becomes the Gist macro. Readers see the gist's files with Confluence's own code highlighting, in light and dark mode. Show one file or all of them, highlight lines, and turn line numbers on or off. Admins can convert pages that use the GitHub Gists in Confluence app's macro, page by page, with Undo. It is free.
| Gist link | On the page |
|---|---|
gist.github.com/your-name/1a2b3c4d | Every file of the gist, each under its name |
…/1a2b3c4d#file-deploy-sh | Only the file deploy.sh |
…/1a2b3c4d#file-deploy-sh-L3-L9 | deploy.sh with lines 3 to 9 highlighted |
…/1a2b3c4d/<revision> | The gist as it was at that revision |
| A raw link to one file | Only that file |
What it does
GitHub gists on Confluence pages
The Gist macro
Paste a gist link onto a page and it becomes the macro. Or insert it from the / menu: paste the link, press Load, choose what to show, check the preview and insert it.
One file or all
Show every file of a gist or only one. When one file is shown you can highlight lines, such as 3, 10-14. Line numbers and wrapping of long lines can each be turned on or off.
Confluence's own highlighting
Code is drawn with Confluence's own code block, so the highlighting follows each reader's light or dark theme. Markdown files show as formatted text, or as code if you choose.
Long files and files that are not text
A file over 400 lines shows its first 400 and a button for the rest. An image, or another file that is not text, is shown as a link to it on GitHub.
It follows the gist
A change to a gist shows on your pages within 15 minutes. If GitHub is down, the page shows the last copy the app kept and says so.
Export
A page exported to Word has the shown files as code blocks, with a link to the gist. Confluence's new PDF export does not call Forge macros at the time of writing.
The converter, for admins
Move pages off the GitHub Gists in Confluence app
GitHub Gists in Confluence runs on Atlassian Connect, and Atlassian ends support for Connect apps on 31 January 2027. If your site uses that app, the converter finds the pages and blog posts that use its GitHub Gist macro and converts them for you, one page at a time.
Find the pages
Click Find pages. The converter lists the pages and blog posts that use the old macro, with the space each one is in. It searches as you, so restricted pages you cannot see are not listed.
Choose what each macro becomes
This app's Gist macro, so the page keeps showing the gist as it changes on GitHub. Or plain Confluence code blocks: a copy of the files as they are now, with a link to the gist, and no app needed afterwards.
Try one page first
Click Convert on one page's row and open that page to check it. Then convert the rest, all at once or one space at a time, after a confirm step. Stop ends the run after the current page.
Undo
Every conversion is a new page version under your name, so the page history keeps the old one. Undo in the converter puts a page back as it was, while nobody has changed it since.
Built to be safe
What goes to GitHub, and what the app will never do
To show a gist, the app's backend asks GitHub for it by the gist's id. No page content, names or account IDs are sent, and nothing is sent to us. Because of these calls the app does not carry the Runs on Atlassian badge.
The backend can reach three GitHub addresses and no others. Every link is checked part by part before any call, so nothing typed into a macro can make the app call another address.
Gist content is shown as text. A Markdown file is turned into Confluence formatting with HTML switched off, so HTML in it is shown as text and never run.
The macro changes nothing. Pages change only when a Confluence admin clicks Convert or Undo, one page at a time, and each change is a new page version under their name.
It stores a copy of each gist it shows, which is GitHub content, and the converter's log: page ids, titles, version numbers and times, so Undo works. It keeps no names, emails or account IDs of the people on your site. No analytics.
Getting started
Install, paste a gist link, or convert your old pages
Install
From the Atlassian Marketplace, in Confluence under Settings → Apps → Find new apps. It's free.
Show a gist
Edit a page and paste a gist link. Or type /Gist, pick the macro, paste the link and press Load. Choose what to show, check the preview, and insert it.
Convert old pages
Admins: open Confluence administration → Apps → Gist converter and click Find pages. Choose what each macro becomes, try one page, then convert the rest.
Free for every site size. The Marketplace listing is not public yet. Request access or ask a question.