       (map (fn [ch]
         (list [:a {:href (rel-url (:id b) (:num ch) (count (:chapters b)))} (:num ch)] " "))))])
 
-(defn toc [m]
+(defn toc [m baseurl canonical]
   (str "<!DOCTYPE html>"
     (html
       [:html {:lang "en"}

        output-dir (first output-dir)]
    (write! output-dir "styles.css" (style))
    (write! output-dir "hiliter.js" (js))
    (write! output-dir "robots.txt" (robots))
    (write! output-dir "sitemap.xml" (sitemap all-chapters))
    (write! output-dir "7ce12f75-f371-4e85-a3e9-b7749a65f140.html" (toc m))
    (dorun
      (map-indexed
        #(write!
          output-dir
          (rel-url %2)
          (chapter %2
            (prev-chapter all-chapters %1)
            (next-chapter all-chapters %1)))
        all-chapters))))
            [:h1.chap
              (chapter-name ch)]
            (map-indexed #(verse %1 ch %2) verses)
            [:div.about [:a {:href "https://github.com/pstephens/kingjames.bible/blob/master/README.md"} "About " baseurl]]
            [:script {:type "text/javascript" :src "hiliter.js"}]]]])))

(defn next-chapter [all-chapters i]
