added markdown: true/false meta-tag

Wed, 31 Jan 2018 19:51:10 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Wed, 31 Jan 2018 19:51:10 +0000
changeset 15
82d254b8f01e
parent 14
bbf5bbd72f48
child 16
e377590e9b19

added markdown: true/false meta-tag

handlers/render.lua file | annotate | diff | comparison | revisions
--- a/handlers/render.lua	Wed Jan 17 18:14:57 2018 +0000
+++ b/handlers/render.lua	Wed Jan 31 19:51:10 2018 +0000
@@ -88,7 +88,12 @@
     if data then
         local newenv=handlers_render.env_for(file, env, path_prefix)
         local data2=handlers_render.process_lua(data, newenv)
-        return markdown(data2)
+        meta=env.pages[file].meta
+        if meta.markdown == nil or meta.markdown == "true" then
+            return markdown(data2)
+        else
+            return data2
+        end
     end
 end
 

mercurial