Multi-configuration support
[hcoop/domtool2.git] / src / autodoc.sml
index 87134e4..231a13e 100644 (file)
@@ -41,7 +41,7 @@ fun check' G fname =
 
 fun autodoc {outdir, infiles} =
     let
-       val (prov, infiles) = Order.order infiles
+       val (prov, infiles) = Order.order NONE infiles
        val _ = HtmlPrint.setProviders prov
 
        val G = foldl (fn (fname, G) => check' G fname) Env.empty infiles
@@ -144,15 +144,18 @@ fun autodoc {outdir, infiles} =
        val items = map (fn file =>
                            let
                                val file' = modify file
+                               val (desc, _, _) = Parse.parse file
                            in
                                LI {ty = NONE,
                                    value = NONE,
-                                   content = TextBlock (A {name = NONE,
-                                                           href = SOME (file' ^ ".html"),
-                                                           rel = NONE,
-                                                           rev = NONE,
-                                                           title = NONE,
-                                                           content = PCDATA (uppercase file')})}
+                                   content = BlockList
+                                                 [TextBlock (A {name = NONE,
+                                                                href = SOME (file' ^ ".html"),
+                                                                rel = NONE,
+                                                                rev = NONE,
+                                                                title = NONE,
+                                                                content = PCDATA (uppercase file')}),
+                                                  TextBlock (PCDATA (Option.getOpt (desc, "")))]}
                            end) infiles
 
        val index = HTML {version = NONE,