]> git.draconx.ca Git - homepage.git/blobdiff - Rules
Embed SVG icons directly into output.
[homepage.git] / Rules
diff --git a/Rules b/Rules
index 7a9773bca3925ff817f42e72df2d744e801dcba4..d3247cb8e2be32b62a75789495b9ed79ae29c05e 100644 (file)
--- a/Rules
+++ b/Rules
@@ -132,9 +132,9 @@ compile '/**/index.lst' do
     layout '/listing.erb'
     layout '/default.xml'
     layout '/default.xsl'
+    layout '/embed-svg.xsl'
     filter :relativize_paths, type: :xml
-    filter :xhtml_compat
-    filter :remove_wj
+    filter :xhtml_compat, fix_doctype: true
     write item.identifier.without_ext + ".xhtml"
 end
 
@@ -145,7 +145,6 @@ compile '/license/gpl*.md' do
     layout '/default.xsl'
     filter :relativize_paths, type: :xml
     filter :xhtml_compat
-    filter :remove_wj
     write to_xhtml
 end
 
@@ -157,7 +156,6 @@ compile '/**/*.md' do
     layout '/default.xsl'
     filter :relativize_paths, type: :xml
     filter :xhtml_compat
-    filter :remove_wj
     write to_xhtml
 end
 
@@ -168,7 +166,6 @@ compile '/license/cc*.sgml' do
     layout '/default.xsl', "section-links": "yes"
     filter :relativize_paths, type: :xml
     filter :xhtml_compat
-    filter :remove_wj
     write to_xhtml
 end
 
@@ -178,7 +175,6 @@ compile '/license/cc*.xhtml' do
     layout '/default.xsl', "section-links": "yes"
     filter :relativize_paths, type: :xml
     filter :xhtml_compat
-    filter :remove_wj
     write to_xhtml
 end
 
@@ -195,7 +191,6 @@ compile '/images/*.jpg', rep: :info do
     layout '/default.xsl'
     filter :relativize_paths, type: :xml
     filter :xhtml_compat
-    filter :remove_wj
     write to_xhtml
 end
 
@@ -210,6 +205,16 @@ compile '/**/*.scss' do
     write @item.identifier.without_ext + '.css'
 end
 
+compile '/**/*.svg' do
+    filter :scour, comment_stripping: true
+    write @item.identifier.to_s
+end
+
+compile '/icons/**/*.svg', rep: :icon32 do
+    filter :svg2png, width: 32, height: 32
+    write @item.identifier.without_ext + "-32.png"
+end
+
 compile '/**/*' do
     filter :copybin if @item.binary?
     write @item.identifier.to_s