Open denisdefreyne opened 7 years ago
Idea: allow compiled content to have multiple “forks” (by default it only has one, e.g. :default
). The #write
call could then take a fork
param, for selecting which fork to write:
compile '/**/*.scss' do
filter :sass
write ext: 'css'
write ext: 'css.map', fork: 'sourcemap'
end
Same for #route
presumably.
It needs more thought around how to run filter
and layout
on different forks. But maybe that’s not needed.
Hi @ddfreyne I would be interested by this capability.
In my setup, I have several images put in content/
.
From them I generate up to 4 representations of each.
:excerpt
repr + webp format:default
repr + webp format:excerpt
repr + original format:default
repr + original formatI guess having a single filter letting me load the image once and output it in various formats could speed up things.
Currently, I'm using system(convert …)
, don't know if imagemagick
can do several processing at once though.
A filter can currently only generate a single piece of output. For some filters, being able to output multiple files is useful (e.g. for Sass, generate CSS + source map).
See also: