summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-05-09 01:50:08 +0200
committerAraq <rumpf_a@web.de>2012-05-09 01:50:08 +0200
commit76235348f8ccb1363100bdc686f0fafae5dacc5f (patch)
treebea06a5eafa73a9202e06955d618d88c097b3f79 /tools
parentc323ec0155cc426e604e0c53a6baf00b17e439d7 (diff)
downloadNim-76235348f8ccb1363100bdc686f0fafae5dacc5f.tar.gz
extracted documentation generator
Diffstat (limited to 'tools')
-rwxr-xr-xtools/nimweb.nim13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index 61f23ab8c..2ca913ec8 100755
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -162,15 +162,12 @@ proc Exec(cmd: string) =
 proc buildDoc(c: var TConfigData, destPath: string) =
   # call nim for the documentation:
   for d in items(c.doc):
-    Exec("nimrod rst2html $# -o:$# --index=$#/theindex $#" %
-      [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"),
-       destpath, d])
+    Exec("nimrod rst2html $# -o:$# --index:on $#" %
+      [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"), d])
   for d in items(c.srcdoc):
-    Exec("nimrod doc $# -o:$# --index=$#/theindex $#" %
-      [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"),
-       destpath, d])
-  Exec("nimrod rst2html $1 -o:$2/theindex.html $2/theindex" %
-       [c.nimrodArgs, destPath])
+    Exec("nimrod doc $# -o:$# --index:on $#" %
+      [c.nimrodArgs, destPath / changeFileExt(splitFile(d).name, "html"), d])
+  Exec("nimrod buildIndex -o:$1/theindex.html $1" % [destPath])
 
 proc buildPdfDoc(c: var TConfigData, destPath: string) =
   if os.execShellCmd("pdflatex -version") != 0: