diff --git a/doc/controllers/doccontroller.lua b/doc/controllers/doccontroller.lua index d48237f..211597a 100644 --- a/doc/controllers/doccontroller.lua +++ b/doc/controllers/doccontroller.lua @@ -123,7 +123,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() -- replace some display plugins content = pre_process_md(content, self) 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 @@ ?>