Pasted a GitHub URL and it did not turn into a macro

What you are seeing

You pasted a GitHub link into the editor and it stayed a plain link instead of becoming a macro.


#Why it happens

Auto-convert only recognises two kinds of link: github.com file links (the ones with /blob/ in them) and raw.githubusercontent.com links. It also stops at 10 folder levels after the branch name.

These do not convert: folder links (tree/), gist links, GitHub Enterprise addresses, www.github.com and very deep paths.


#What to do

Use a plain github.com /blob/ file link. Or insert the macro from the macro browser and pick the file through Browse GitHub.


#Settings involved

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 page 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.


#Limits that apply here

Limit

Value

What happens

Auto-convert: only two hosts

github.com and raw.githubusercontent.com

Only github.com file links and raw.githubusercontent.com links convert. Folder (tree/) links, gists and GitHub Enterprise addresses do not.

Image height

800 pixels

Images from GitHub show up to 800 pixels tall.

Code viewer height

600 pixels

The code viewer is capped at 600 pixels tall.



Found it? Good.