al-quran.reflectslight.io/nanoc/rules/assets.rules
0x1eef d7cb6f62be images/opengraph/ -> images/og/
But most importantly, for src/og/0.png:

* resize to 512x512
* apply a white background
* similar to the format for og/1.png, og/2.png, etc
2024-05-02 07:32:11 -03:00

37 lines
598 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/og/*.png" do
write(item.identifier.to_s)
end
compile "/favicon.ico" do
write(item.identifier.to_s)
end
##
# JSON
passthrough "/json/durations/*/*.json"