# HG changeset patch # User Tuomo Valkonen # Date 1594056923 18000 # Node ID 11ae9103f59d932a734b3aa30adb11f0226ef3fd # Parent 4013d290183239496381c02389c694f0f5c9f024 Destination name creation changes diff -r 4013d2901832 -r 11ae9103f59d handlers/render.lua --- 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={