Skip to content

Commit 5e19ec3

Browse files
authored
Add support for GFM admonitions in the blog (#52)
* Add support for GFM admonitions in the blog Signed-off-by: Harry Mellor <[email protected]> * Update `jekyll-gfm-admonitions` Signed-off-by: Harry Mellor <[email protected]> --------- Signed-off-by: Harry Mellor <[email protected]>
1 parent 447290f commit 5e19ec3

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

Gemfile

Lines changed: 4 additions & 1 deletion
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", '~> 1.2'
6+
end

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ GEM
2727
commonmarker (0.23.11)
2828
concurrent-ruby (1.3.5)
2929
connection_pool (2.5.0)
30+
cssminify (1.0.2)
3031
csv (3.3.2)
3132
dnsruby (1.72.3)
3233
base64 (~> 0.2.0)
@@ -138,6 +139,10 @@ GEM
138139
jekyll (>= 3.0, < 5.0)
139140
jekyll-feed (0.17.0)
140141
jekyll (>= 3.7, < 5.0)
142+
jekyll-gfm-admonitions (1.2.0)
143+
cssminify (~> 1.0)
144+
jekyll (>= 3.0, < 5.0)
145+
octicons (~> 19.8)
141146
jekyll-gist (1.5.0)
142147
octokit (~> 4.2)
143148
jekyll-github-metadata (2.16.1)
@@ -239,6 +244,7 @@ GEM
239244
racc (~> 1.4)
240245
nokogiri (1.18.4-x86_64-linux-gnu)
241246
racc (~> 1.4)
247+
octicons (19.15.1)
242248
octokit (4.25.1)
243249
faraday (>= 1, < 3)
244250
sawyer (~> 0.9)
@@ -275,10 +281,12 @@ GEM
275281

276282
PLATFORMS
277283
arm64-darwin
284+
arm64-darwin-24
278285
x86_64-linux
279286

280287
DEPENDENCIES
281288
github-pages (~> 232)
289+
jekyll-gfm-admonitions (~> 1.2)
282290

283291
BUNDLED WITH
284292
2.6.2

README.md

Lines changed: 24 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)