X-Git-Url: http://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/4f4b3ddd920c95d380a2f25dabd4b68457bb1564..d07907f27644b18d6d552907d31ae98f8585ef38:/Rules diff --git a/Rules b/Rules index f3f1f0a..e00c5f3 100644 --- a/Rules +++ b/Rules @@ -36,6 +36,17 @@ preprocess do item[:gitrev] = commit if item_source(item) end end + + @items.find_all('/weblog/*.md').each do |item| + item[:kind] ||= 'article' + end + + @items.each do |item| + item[:created_at] ||= + item[:published] || File.stat(item.raw_filename).mtime + item[:updated_at] ||= + item[:updated] || File.stat(item.raw_filename).mtime + end end postprocess do @@ -138,8 +149,9 @@ compile '/license/cc*.xhtml' do end compile '/images/*.jpg', rep: :large do - filter :imgresize, width: 1200, height: 1200 - write item.identifier.without_ext + '-t1200.' + item.identifier.ext + filename = item.identifier.without_ext + '-t1200.' + item.identifier.ext + filter :imgresize, width: 1200, height: 1200, cache: filename + write filename end compile '/images/*.jpg', rep: :info do @@ -165,8 +177,8 @@ compile '/**/*.scss' do end compile '/**/*' do - filter :copybin if @item.binary? - write @item.identifier.to_s + filter :copybin if @item.binary? + write @item.identifier.to_s end layout '/**/*.xsl', :xsl