]> git.draconx.ca Git - homepage.git/blobdiff - Rules
Make permalinks in section headers optional.
[homepage.git] / Rules
diff --git a/Rules b/Rules
index d0a81fb8c496c7f2232393bdba6f32dbd68fdc30..383feb6d6e06107a05eb1d7bbcbfbdf15ae6d702 100644 (file)
--- a/Rules
+++ b/Rules
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 #
-# Copyright © 2018-2019 Nick Bowler
+# Copyright © 2018-2020 Nick Bowler
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -54,6 +54,7 @@ compile '/license/gpl*.md' do
     layout '/gpl.xsl'
     layout '/default.xsl'
     filter :relativize_paths, type: :xml
+    filter :xhtml_compat
     filter :remove_wj
     write to_xhtml
 end
@@ -65,6 +66,7 @@ compile '/**/*.md' do
     layout '/default.xml'
     layout '/default.xsl'
     filter :relativize_paths, type: :xml
+    filter :xhtml_compat
     filter :remove_wj
     write to_xhtml
 end
@@ -73,8 +75,9 @@ compile '/license/cc*.sgml' do
     filter :sgml2xml
     layout '/creativecommons.xsl'
     layout '/default.xml'
-    layout '/default.xsl'
+    layout '/default.xsl', "section-links": "yes"
     filter :relativize_paths, type: :xml
+    filter :xhtml_compat
     filter :remove_wj
     write to_xhtml
 end
@@ -82,12 +85,24 @@ end
 compile '/license/cc*.xhtml' do
     layout '/creativecommons.xsl'
     layout '/default.xml'
-    layout '/default.xsl'
+    layout '/default.xsl', "section-links": "yes"
     filter :relativize_paths, type: :xml
+    filter :xhtml_compat
     filter :remove_wj
     write to_xhtml
 end
 
+compile '/**/*.scss' do
+    filter :sass, syntax: :scss
+    filter :css_source, uribase: \
+        "https://git.draconx.ca/gitweb/homepage.git/blob/" +
+        @item[:gitrev] + ":"
+    filter :css_clean_selectors, \
+        preserve_comments: true, \
+        preserve_hacks: true
+    write @item.identifier.without_ext + '.css'
+end
+
 passthrough '/**/*'
 layout '/**/*.xsl', :xsl
 layout '/**/*', :erb