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 @@ ?>
- +
- \ No newline at end of file + \ No newline at end of file diff --git a/doc/views/default/layout.ls b/doc/views/default/layout.ls index b41d96f..4f14b2c 100644 --- a/doc/views/default/layout.ls +++ b/doc/views/default/layout.ls @@ -13,10 +13,10 @@ local elinks = __main__:get("elinks") rel="stylesheet" type="text/css" href="/rst/katex/katex.min.css" /> - + >