al-quran.reflectslight.io/nanoc/rules/assets.rules
2024-03-10 08:54:42 -03:00

37 lines
600 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 "/favicon*.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 "/durations/*/*.json"