Page byline: GitHub

The GitHub byline item sits under the page title, so readers can see at a glance that a page pulls files from GitHub and jump to them. Its tooltip reads "Add files from GitHub". Once it has loaded it shows a count, such as 1 file or 3 files. Select it to see the list, and select a file to go straight to it on github.com.


#What the byline shows

Byline reads

What it means

GitHub

The byline is still loading. Confluence shows this name first, then swaps in the count.

1 file or N files

The page holds that many Github file macros. The list labels each file with its Title, or its path when there is no Title.

Github with no count

No GitHub files are recorded for the page yet, or the count could not be read. Opening it shows No Git files found with a tip to type /git in the editor.

Git: error

The byline could not load for this view. Hover over it: the tooltip reads Git could not load: followed by the reason, such as an HTTP status. The files on the page are not affected.


#Where you do it

Task

Where

Connect your GitHub account

On a Confluence page, insert the "Github file (Capable)" macro, then select Connect GitHub in the macro. Or open the macro's configuration and select Connect in the Browse GitHub window. See Connect your GitHub account to Confluence.

Add a file from a repository to a page

Macro configuration β†’ Browse GitHub window. See Embed a GitHub file in Confluence.

Add a file without opening the picker

The Confluence editor. Paste a GitHub file link and it turns into the macro.


#Settings that affect this

Setting

Where

What it does

There is no GitHub settings screen

Nowhere

Capable global settings and space settings have no GitHub tab. There is also no admin screen for connecting the whole site to GitHub. Each person connects their own account.

Hide GitHub across the whole site

Capable's site-wide hidden capabilities setting

Hides GitHub across the whole site. This affects the byline only. Existing GitHub macros keep showing on pages.

Turn GitHub on or off per space

Capable's per-space capability setting (always off or always on)

Always off hides the byline in that space. Always on shows it even on pages with no GitHub macro. Again, this affects the byline only. Macros still show.


#A few things that catch people out

  • Hiding GitHub, site-wide or for a space, hides the byline only. Existing GitHub macros keep showing.

  • The byline only appears for signed-in readers who can view the page. Logged-out and unlicensed readers see the files but no byline.

  • The count comes from Confluence's index of the page, so a macro you have just added can take a moment to be counted.

  • The macro is a live view of GitHub, not a snapshot. Every view fetches the latest content, so you always see the current file. On busy pages that can be slower, and it can run into GitHub's rate limits.



How it actually behaves.