1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2025-02-01 17:32:46 +01:00
antd-web-apps/doc/controllers/IndexController.lua
DanyLE b65bee0323
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
update: working version compatible with the latest version of silk and antd
2023-05-22 13:53:41 +02:00

23 lines
581 B
Lua

BaseController:subclass("IndexController")
function IndexController:index(...)
local file = io.open(DOC_COVER, "r")
if file then
local content = ""
local md = require("md")
local callback = function(s) content = content .. s end
md.to_html(file:read("*a"), callback)
file:close()
self.template:set("data", content)
end
return true
end
function IndexController:actionnotfound(...)
self.template:setView("book")
return self:book(table.unpack({...}))
end
function IndexController:book(...)
return true
end