From 88dfb22fe3aae5aabdc1c1db589d9d4c032c78eb Mon Sep 17 00:00:00 2001 From: s0urce-c0de Date: Wed, 11 Dec 2024 17:57:50 +0000 Subject: [PATCH] im workin on smthn --- .vscode/settings.json | 4 ++++ _plugins/admonitions.rb | 6 +++--- assets/favicon/convert.sh | 0 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json mode change 100755 => 100644 _plugins/admonitions.rb mode change 100755 => 100644 assets/favicon/convert.sh diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5cf15e8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.insertSpaces": true, + "editor.tabSize": 2 +} \ No newline at end of file diff --git a/_plugins/admonitions.rb b/_plugins/admonitions.rb old mode 100755 new mode 100644 index 92925b7..093e8a2 --- a/_plugins/admonitions.rb +++ b/_plugins/admonitions.rb @@ -25,7 +25,7 @@ ADMONITION = /(> \[\!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\] *((?:\n> .*)+))/ -TEMPLATE = '''
+ADMONITION_TEMPLATE = '''

%s %s

%s

''' @@ -40,7 +40,7 @@ for full, admonition, admonition_content in matches do admonition_content.sub! '> ', '' admonition_content.gsub! '\n> ', '\n' - content.sub! full, TEMPLATE % [ + content.sub! full, ADMONITION_TEMPLATE % [ ADMONITION_TO_DATA[admonition.downcase.to_sym][:color], ADMONITION_TO_DATA[admonition.downcase.to_sym][:color], Octicons::Octicon.new(ADMONITION_TO_DATA[admonition.downcase.to_sym][:icon]).to_svg, @@ -50,8 +50,8 @@ end else Jekyll.logger.debug "No admonitions found." - page.content = content end + page.content = content else Jekyll.logger.debug "Not processing #{page.name}" end diff --git a/assets/favicon/convert.sh b/assets/favicon/convert.sh old mode 100755 new mode 100644