1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 10:18:21 +01:00
antd-web-apps/doc/controllers/IndexController.lua
DanyLE a76942f2f3
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
WIP: make code compatible with new SILK API
2023-04-26 18:51:03 +02:00

24 lines
620 B
Lua

BaseController:subclass("IndexController")
function IndexController:index(...)
-- TODO: add description to router
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