al-quran.reflectslight.io/nanoc/rules/assets.rules

37 lines
605 B
Ruby

#!/usr/bin/env ruby
# frozen_string_literal: true
##
# Contains rules that are related to assets (eg images, fonts, etc)
##
# Fonts
compile "/fonts/*" do
write(item.identifier.to_s)
filter :gzip
write("#{item.identifier}.gz")
end
##
# Images
compile "/images/*.svg" do
write(item.identifier.to_s)
filter :gzip
write("#{item.identifier}.gz")
end
compile "/images/*.png" do
write(item.identifier.to_s)
end
compile "/images/opengraph/*.png" do
write(item.identifier.to_s)
end
compile "/favicon.ico" do
write(item.identifier.to_s)
end
##
# JSON
passthrough "/json/durations/*/*.json"