Skip to content

Commit 4a56a95

Browse files
committed
Add support for GFM admonitions in the blog
Signed-off-by: Harry Mellor <[email protected]>
1 parent 447290f commit 4a56a95

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

Gemfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem "github-pages", "~> 232", group: :jekyll_plugins
3+
group :jekyll_plugins do
4+
gem "github-pages", "~> 232"
5+
gem "jekyll-gfm-admonitions"
6+
end

Gemfile.lock

+4
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ GEM
138138
jekyll (>= 3.0, < 5.0)
139139
jekyll-feed (0.17.0)
140140
jekyll (>= 3.7, < 5.0)
141+
jekyll-gfm-admonitions (0.1.0)
142+
jekyll (~> 3.0)
141143
jekyll-gist (1.5.0)
142144
octokit (~> 4.2)
143145
jekyll-github-metadata (2.16.1)
@@ -275,10 +277,12 @@ GEM
275277

276278
PLATFORMS
277279
arm64-darwin
280+
arm64-darwin-24
278281
x86_64-linux
279282

280283
DEPENDENCIES
281284
github-pages (~> 232)
285+
jekyll-gfm-admonitions
282286

283287
BUNDLED WITH
284288
2.6.2

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,30 @@ math block
3131
$$
3232
```
3333

34+
## GitHub Flavored Admonitions
35+
36+
The blog supports GitHub flavored admonitions via [jekyll-gfm-admonition](https://github.com/Helveg/jekyll-gfm-admonitions). It supports the following syntax:
37+
38+
```markdown
39+
> [!NOTE]
40+
> Highlights information that users should take into account, even when skimming.
41+
> And supports multi-line text.
42+
43+
> [!TIP]
44+
> Optional information to help a user be more successful.
45+
46+
> [!IMPORTANT]
47+
> Crucial information necessary for users to succeed.
48+
49+
> [!WARNING]
50+
> Critical content demanding immediate
51+
> user attention due to potential risks.
52+
53+
> [!CAUTION]
54+
> Negative potential consequences of an action.
55+
> Opportunity to provide more context.
56+
```
57+
3458
## Theme customization
3559

3660
The theme we are using is [Minima](https://github.com/jekyll/minima). If you need to customise anything from this theme, see [Overriding theme defaults](https://jekyllrb.com/docs/themes/#overriding-theme-defaults).

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ remote_theme: jekyll/minima@5ce4006d175e6e5278bb63a0aad1a85e3bf2370b
1717
plugins:
1818
- jekyll-feed
1919
- jekyll-seo-tag
20+
- jekyll-gfm-admonitions
2021

2122
# Theme-specific settings
2223

0 commit comments

Comments
 (0)