Skip to content

Commit 6b9d4c3

Browse files
committed
Render the ![IMPORTANT] messages similar to GitHub
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent aed7b1f commit 6b9d4c3

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

assets/sass/style.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,11 @@ body.page {
358358
width: 65%;
359359
}
360360
}
361+
.markdown-important::before {
362+
content:url('img/important.svg');
363+
padding-left: 0.6em;
364+
padding-right: 0.2em;
365+
}
366+
.markdown-important {
367+
border-left: .25em solid #f34f29;
368+
}

layouts/_default/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{{ define "main" }}
2-
{{ .Content }}
2+
{{ replace .Content "<p>[!IMPORTANT]" "<p class=\"markdown-important\">" | safeHTML }}
33
{{ end }}

static/img/important.svg

Lines changed: 16 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)