X-Git-Url: https://git.draconx.ca/gitweb/homepage.git/blobdiff_plain/062c731462e3ec513b470308cc2dd475098ce231..19f5d7df33b2deaf3bd2efc68bd3d163c93b194f:/lib/compiledcontent.rb diff --git a/lib/compiledcontent.rb b/lib/compiledcontent.rb new file mode 100644 index 0000000..016ed23 --- /dev/null +++ b/lib/compiledcontent.rb @@ -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 . + +class CompiledContentFilter < Nanoc::Filter + identifier :compiled_content + + def run(content, params = {}) + return @item.compiled_content(params) + end +end