Method: (GENERATE-TABLE-OF-CONTENTS T HTML-GENERATOR)

Source

(defmethod generate-table-of-contents (sections (generator html-generator))
  (<qbook-page :title (title generator)
               :file-name "index.html"
               (<:div :class "contents"
                      (<:h1 :class "title" (<:as-html (title generator)))
                      (<:h2 "Table of Contents")
                      (dolist (section sections)
                        (dolist (part section)
                          (when (heading-part-p part)
                            (<:div :class (strcat "contents-heading-" (depth part))
                                   (<:a :href (make-anchor-link part)
                                        (<:as-html (text part)))))))
                      (<:h2 "Indexes")
                      (dolist (index (book-indexes-sorted *book*))
                        (<:div :class "contents-heading-1"
                               (<:a :href (strcat "index/" (label-prefix (make-instance index)) ".html")
                                    (<:as-html (pretty-label-prefix (make-instance index)))
                                    " Index")))
                      (<:div :class "contents-heading-1"
                             (<:a :href "index/permutated.html" "Permuted Symbol Index")))))
Source Context