handlers/render.lua

changeset 25
11ae9103f59d
parent 23
0ea4b0786b43
child 26
77cd7b8fb6a6
equal deleted inserted replaced
24:4013d2901832 25:11ae9103f59d
54 54
55 local destination 55 local destination
56 if meta.destination then 56 if meta.destination then
57 destination=path.join(path.dirname(file), meta.destination) 57 destination=path.join(path.dirname(file), meta.destination)
58 else 58 else
59 -- If the file has two extensions, then only remove last extension.
60 -- Otherwise replace extension with .html.
59 destination=path.rmext(file) 61 destination=path.rmext(file)
62 base=path.rmext(destination)
63 if base==destination then
64 destination = destination .. ".html"
65 end
60 end 66 end
61 67
62 local page={ 68 local page={
63 data=data, 69 data=data,
64 meta=meta, 70 meta=meta,

mercurial