How to link to Github issues/PRs in Discourse?

I have seen comments that feature a little box that includes the summary of an issue/PR on Github. Is there some special Discourse syntax for this?

1 Like

Just include the link. Discourse will automatically fetch a preview and display it.

I am not sure it does that — I have a link here and Discourse did not do anything automatically.

If I include a link here it seems to work fine:

https://github.com/JuliaLang/julia/pull/16961

EDIT: Test

EDIT2: Seems to include the summary if you post the plain link, but if you make a link text then it doesn’t.

Thanks. So are these features documented somewhere, or do we find out by trial and error (or reading the Discourse sources)?

Looking on the Discourse site, I found documentation of the comment format, which talks about CommonMark and BBCode but does not mention these features.

I’ve been discovering them by just stumbling over them mostly.

This only happens if the link is on a line by itself. This feature is called a “onebox”.

5 Likes

Thanks. Would it be possible to have a “documentation” button somewhere on the page, that describes the comment syntax (mostly CommonMark) and features like this which you enabled for the site?