From 3a03ed82f879db638f01221991a9d75566596cf7 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Sun, 7 Apr 2024 19:41:56 +0100 Subject: [PATCH 1/3] Add another section to my `_config.yml` --- _config.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index d075e37fa..8dd3e1c03 100644 --- a/_config.yml +++ b/_config.yml @@ -78,6 +78,14 @@ collections: output: true permalink: "/til/:year/:title/" +# ================ +# Permalink config +# ================ +# +# Set the URL structure for permalinks on my posts. +# See https://jekyllrb.com/docs/permalinks/#global +permalink: "/:year/:title/" + # ================== # Template variables # ================== @@ -93,12 +101,10 @@ url: "https://alexwlchan.net" description: "Alex Chan's personal website" -# ================ -# Remaining config - date_format: "%-d %B %Y" -permalink: "/:year/:title/" +# ================ +# Remaining config keep_files: [ # Managed by rsync outside the main Jekyll process From 0693b376aee2aa5b50a1124a4222069fb132bc48 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Sun, 7 Apr 2024 19:42:31 +0100 Subject: [PATCH 2/3] Remove the unused eggbox component --- src/_includes/eggbox.html | 8 -------- src/_scss/base/layout.scss | 12 ------------ 2 files changed, 20 deletions(-) delete mode 100644 src/_includes/eggbox.html diff --git a/src/_includes/eggbox.html b/src/_includes/eggbox.html deleted file mode 100644 index c36f815d9..000000000 --- a/src/_includes/eggbox.html +++ /dev/null @@ -1,8 +0,0 @@ -{% assign eggbox_articles = include.articles | split: " " %} - - diff --git a/src/_scss/base/layout.scss b/src/_scss/base/layout.scss index 35f2f98bc..29741d6a3 100644 --- a/src/_scss/base/layout.scss +++ b/src/_scss/base/layout.scss @@ -128,15 +128,3 @@ a.download { margin-right: 0px; } } - -@media screen and (max-width: 500px) { - .eggbox-4 li:nth-child(4) { - display: none; - } -} - -@media screen and (min-width: 1000px) { - .eggbox-4 li:nth-child(4) { - display: none; - } -} From d33a3777d62067341f8eeab3fbb4d97a428f0083 Mon Sep 17 00:00:00 2001 From: Alex Chan Date: Sun, 7 Apr 2024 19:42:39 +0100 Subject: [PATCH 3/3] Add caching to another text processing filter --- src/_plugins/filter_cleanup_text.rb | 36 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/_plugins/filter_cleanup_text.rb b/src/_plugins/filter_cleanup_text.rb index 81603785a..7d24f8770 100644 --- a/src/_plugins/filter_cleanup_text.rb +++ b/src/_plugins/filter_cleanup_text.rb @@ -89,25 +89,29 @@ def self.add_non_breaking_spaces(input) module Jekyll module CleanupsFilter def cleanup_text(input) - text = AddNonBreakingSpaces.add_non_breaking_spaces(input) + cache = Jekyll::Cache.new('CleanupText') - # Display "LaTeX" in a nice way, if you have CSS enabled - text = text.gsub( - ' LaTeX', - ' LaTeK' - ) + cache.getset(input) do + text = AddNonBreakingSpaces.add_non_breaking_spaces(input) - text = text.gsub( - ' TeX', - ' TeK' - ) + # Display "LaTeX" in a nice way, if you have CSS enabled + text = text.gsub( + ' LaTeX', + ' LaTeK' + ) - # Make sure that footnote markers are rendered as a text - # arrow on iOS devices, not emoji. For more info: - # http://daringfireball.net/linked/2015/04/22/unicode-emoji - text - .gsub('↩', '↩︎') - .gsub('↩', '↩︎') + text = text.gsub( + ' TeX', + ' TeK' + ) + + # Make sure that footnote markers are rendered as a text + # arrow on iOS devices, not emoji. For more info: + # http://daringfireball.net/linked/2015/04/22/unicode-emoji + text + .gsub('↩', '↩︎') + .gsub('↩', '↩︎') + end end end end