As Waylan mentions in his answer, Github strips script and style tags from the markdown before displaying it. This means the only possibilities for notification boxes that will render on Github are those provided by native markdown or html.
After some searching and experimenting, I discovered it is possible to (ab)use the
tables syntax,
and combine it with Github emoji markdown.
For example:
-
Boxes from a single cell table:
| :exclamation: This is very important | |-----------------------------------------| | :zap: Ignore at your own risk! | |-----------------------------------------|
-
Boxes from a single row table with 2 cells:
| :memo: | Take note of this | |---------------|:------------------------| | :point_up: | Remember to not forget! | |---------------|:------------------------|
-
Boxes from a 2 row table:
| :warning: WARNING | |:---------------------------| | I should warn you ... | | :boom: DANGER | |:---------------------------| | Will explode when clicked! |
Note that markdown tables do not allow newlines, so you should use <br />
tags if you need multiple lines inside the box. In this case it might be simpler to directly use the html <table>
tag, since it doesn’t have this newline restriction. It also allows getting rid of the bold styling of the table header <thead>
by replacing its <th>
tags with <td>
tags:
<table>
<thead>
<tr>
<td align="left">
:information_source: Information
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>Tis not true.</li>
<li>I won't explode.</li>
</ul>
</td>
</tr>
</tbody>
</table>