aboutsummaryrefslogtreecommitdiff
path: root/_plugins/generate-favicon.rb
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-03 21:33:16 -0300
committerEuAndreh <eu@euandre.org>2021-01-03 21:33:16 -0300
commit433428cf6b4ef8a653f349e0a0d1fa0d10aab1e7 (patch)
treef2d34cfb13a8afc47902cb5478f1fbd2d4229817 /_plugins/generate-favicon.rb
parentdengoso.ly: Add tempo marker (diff)
downloadeuandre.org-433428cf6b4ef8a653f349e0a0d1fa0d10aab1e7.tar.gz
euandre.org-433428cf6b4ef8a653f349e0a0d1fa0d10aab1e7.tar.xz
Generate favicon.ico from SVG
Diffstat (limited to '')
-rw-r--r--_plugins/generate-favicon.rb7
1 files changed, 7 insertions, 0 deletions
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