handlers/render.lua

changeset 25
11ae9103f59d
parent 23
0ea4b0786b43
child 26
77cd7b8fb6a6
--- a/handlers/render.lua	Mon Jul 06 12:35:04 2020 -0500
+++ b/handlers/render.lua	Mon Jul 06 12:35:23 2020 -0500
@@ -56,7 +56,13 @@
     if meta.destination then
         destination=path.join(path.dirname(file), meta.destination)
     else
+        -- If the file has two extensions, then only remove last extension.
+        -- Otherwise replace extension with .html.
         destination=path.rmext(file)
+        base=path.rmext(destination)
+        if base==destination then
+            destination = destination .. ".html"
+        end
     end
 
     local page={

mercurial