aboutsummaryrefslogtreecommitdiff
path: root/doc/markdowndoc.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-09-12 11:24:11 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-09-12 11:24:11 -0400
commit9dc8ce16a1efc6482db6f1d5456d42958e79a06c (patch)
treee26ff636143fc74f92a6a3359a73e93194da6bc3 /doc/markdowndoc.lua
parent4305f32ac153b7a45a1c001da2fcd412af905168 (diff)
downloadtextadept-9dc8ce16a1efc6482db6f1d5456d42958e79a06c.tar.gz
textadept-9dc8ce16a1efc6482db6f1d5456d42958e79a06c.zip
Documentation overhaul.
Rewrote most of the manual and Lua API to complement each other. Key bindings reference moved from Appendix to modules/textadept/keys.lua LuaDoc.
Diffstat (limited to 'doc/markdowndoc.lua')
-rw-r--r--doc/markdowndoc.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/markdowndoc.lua b/doc/markdowndoc.lua
index 85069370..e44e8c37 100644
--- a/doc/markdowndoc.lua
+++ b/doc/markdowndoc.lua
@@ -170,6 +170,12 @@ function M.start(doc)
-- Write index.html.
template.nav = nav
+ local api_index = M.options.output_dir..'/.api_index.md'
+ if (require 'lfs').attributes(api_index) then
+ local p = io_popen('markdown -f toc -T "'..api_index..'"')
+ template.toc, template.main = p:read('*all'):match('^(.-\n</ul>\n)(.+)$')
+ p:close()
+ end
f = io_open(M.options.output_dir..'/api/index.html', 'wb')
local html = HTML:gsub('%%%(([^)]+)%)', template)
f:write(html)