diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | _plugins/generate-favicon.rb | 25 |
2 files changed, 11 insertions, 27 deletions
@@ -22,13 +22,22 @@ lilypond = \ $(lilypond.midi) \ $(lilypond.ogg) +favicons = static/favicon.png favicon.ico -all: $(lilypond) + +all: $(lilypond) $(favicons) $(lilypond.pdf): $(lilypond.midi) +static/favicon.png: static/favicon.svg + inkscape -o $@ -w 420 -h 420 -b white $? + +favicon.ico: static/favicon.svg + convert $? $@ + + check: sh aux/assert-shellcheck.sh sh aux/workflow/assert-todos.sh @@ -41,7 +50,7 @@ dev-check: check clean: rm -rf \ public/ \ - $(lilypond) + $(lilypond) $(favicons) public: all jekyll build diff --git a/_plugins/generate-favicon.rb b/_plugins/generate-favicon.rb deleted file mode 100644 index ee443a3..0000000 --- a/_plugins/generate-favicon.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Jekyll - class FaviconGenerator < Generator - safe true - priority :high - - SIZE = 420 - - def generate(site) - svg = 'static/favicon.svg' - png = 'static/favicon.png' - unless File.exist? png then - puts "Missing '#{png}', generating..." - puts `inkscape -o #{png} -w #{SIZE} -h #{SIZE} -b white #{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 |