diff --git a/doc/controllers/doccontroller.lua b/doc/controllers/doccontroller.lua index a97cd78..0d4ddae 100644 --- a/doc/controllers/doccontroller.lua +++ b/doc/controllers/doccontroller.lua @@ -105,7 +105,12 @@ function DocController:index(...) end if path and ulib.exists(path) then local file = io.open(path, "r") - local content = file:read("*a") + 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:setView("index", "index") self.template:set("data", content) diff --git a/doc/views/default/index/index.ls b/doc/views/default/index/index.ls index 8c54fef..de42c6a 100644 --- a/doc/views/default/index/index.ls +++ b/doc/views/default/index/index.ls @@ -88,7 +88,9 @@ ?>