From 4a56a95955494027598f59e1e9ac08b8d30651ad Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:26:28 +0100 Subject: [PATCH 1/2] Add support for GFM admonitions in the blog Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- Gemfile | 5 ++++- Gemfile.lock | 4 ++++ README.md | 24 ++++++++++++++++++++++++ _config.yml | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 2b95c23..1c1e6a0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ source "https://rubygems.org" -gem "github-pages", "~> 232", group: :jekyll_plugins +group :jekyll_plugins do + gem "github-pages", "~> 232" + gem "jekyll-gfm-admonitions" +end diff --git a/Gemfile.lock b/Gemfile.lock index aab628b..fc74453 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -138,6 +138,8 @@ GEM jekyll (>= 3.0, < 5.0) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) + jekyll-gfm-admonitions (0.1.0) + jekyll (~> 3.0) jekyll-gist (1.5.0) octokit (~> 4.2) jekyll-github-metadata (2.16.1) @@ -275,10 +277,12 @@ GEM PLATFORMS arm64-darwin + arm64-darwin-24 x86_64-linux DEPENDENCIES github-pages (~> 232) + jekyll-gfm-admonitions BUNDLED WITH 2.6.2 diff --git a/README.md b/README.md index 33f7f82..5871461 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,30 @@ math block $$ ``` +## GitHub Flavored Admonitions + +The blog supports GitHub flavored admonitions via [jekyll-gfm-admonition](https://github.com/Helveg/jekyll-gfm-admonitions). It supports the following syntax: + +```markdown +> [!NOTE] +> Highlights information that users should take into account, even when skimming. +> And supports multi-line text. + +> [!TIP] +> Optional information to help a user be more successful. + +> [!IMPORTANT] +> Crucial information necessary for users to succeed. + +> [!WARNING] +> Critical content demanding immediate +> user attention due to potential risks. + +> [!CAUTION] +> Negative potential consequences of an action. +> Opportunity to provide more context. +``` + ## Theme customization 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). \ No newline at end of file diff --git a/_config.yml b/_config.yml index 603df6c..1af635e 100644 --- a/_config.yml +++ b/_config.yml @@ -17,6 +17,7 @@ remote_theme: jekyll/minima@5ce4006d175e6e5278bb63a0aad1a85e3bf2370b plugins: - jekyll-feed - jekyll-seo-tag + - jekyll-gfm-admonitions # Theme-specific settings From 0795028852b3bf04f0266f6244297ece7510373f Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Wed, 16 Apr 2025 11:41:53 +0100 Subject: [PATCH 2/2] Update `jekyll-gfm-admonitions` Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 1c1e6a0..4d9f453 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,5 @@ source "https://rubygems.org" group :jekyll_plugins do gem "github-pages", "~> 232" - gem "jekyll-gfm-admonitions" + gem "jekyll-gfm-admonitions", '~> 1.2' end diff --git a/Gemfile.lock b/Gemfile.lock index fc74453..6930447 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,6 +27,7 @@ GEM commonmarker (0.23.11) concurrent-ruby (1.3.5) connection_pool (2.5.0) + cssminify (1.0.2) csv (3.3.2) dnsruby (1.72.3) base64 (~> 0.2.0) @@ -138,8 +139,10 @@ GEM jekyll (>= 3.0, < 5.0) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) - jekyll-gfm-admonitions (0.1.0) - jekyll (~> 3.0) + jekyll-gfm-admonitions (1.2.0) + cssminify (~> 1.0) + jekyll (>= 3.0, < 5.0) + octicons (~> 19.8) jekyll-gist (1.5.0) octokit (~> 4.2) jekyll-github-metadata (2.16.1) @@ -241,6 +244,7 @@ GEM racc (~> 1.4) nokogiri (1.18.4-x86_64-linux-gnu) racc (~> 1.4) + octicons (19.15.1) octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) @@ -282,7 +286,7 @@ PLATFORMS DEPENDENCIES github-pages (~> 232) - jekyll-gfm-admonitions + jekyll-gfm-admonitions (~> 1.2) BUNDLED WITH 2.6.2