From 433428cf6b4ef8a653f349e0a0d1fa0d10aab1e7 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 3 Jan 2021 21:33:16 -0300 Subject: Generate favicon.ico from SVG --- _plugins/generate-favicon.rb | 7 +++++++ default.nix | 1 + favicon.ico | Bin 1150 -> 0 bytes 3 files changed, 8 insertions(+) delete mode 100644 favicon.ico diff --git a/_plugins/generate-favicon.rb b/_plugins/generate-favicon.rb index 71fbb9e..08de8b2 100644 --- a/_plugins/generate-favicon.rb +++ b/_plugins/generate-favicon.rb @@ -13,6 +13,13 @@ module Jekyll puts `inkscape -o #{png} -w #{SIZE} -h #{SIZE} #{svg}` site.static_files << Jekyll::StaticFile.new(site, site.source, '', png) end + + ico = 'favicon.ico' + unless File.exist? ico then + puts "Missing '#{ico}', generating..." + puts `convert #{svg} #{ico}` + site.static_files << Jekyll::StaticFile.new(site, site.source, '', ico) + end end end end diff --git a/default.nix b/default.nix index fa15455..f949982 100644 --- a/default.nix +++ b/default.nix @@ -30,6 +30,7 @@ let mediainfo mkvtoolnix-cli inkscape + imagemagick perl graphviz diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index 8ebd54f..0000000 Binary files a/favicon.ico and /dev/null differ -- cgit v1.2.3