How to link to Github issues/PRs in Discourse?

question

#1

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?


#2

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


#3

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


#4

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

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.


#5

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.


#6

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


#7

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


#8

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?