]> git.draconx.ca Git - homepage.git/blobdiff - lib/compiledcontent.rb
Implement dark mode without using CSS variables.
[homepage.git] / lib / compiledcontent.rb
diff --git a/lib/compiledcontent.rb b/lib/compiledcontent.rb
new file mode 100644 (file)
index 0000000..016ed23
--- /dev/null
@@ -0,0 +1,25 @@
+# Nick's web site: compiled_content filter.  Simply calls the compiled_content
+# method on the current item to retrieve the text from a named rep or snapshot.
+#
+# Copyright © 2022 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+class CompiledContentFilter < Nanoc::Filter
+    identifier :compiled_content
+
+    def run(content, params = {})
+        return @item.compiled_content(params)
+    end
+end