       (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"}

(defn prev-chapter [all-chapters i]
  (get all-chapters (dec i)))

(defn sitemap-line [rel-url freq priority]
  (str
    "<url><loc>https://kingjames.bible/"
    rel-url
    "</loc><changefreq>"
    freq
    "</changefreq><priority>"

          [:title "The King James Bible"]
          [:meta {:name "description" :content "The King James Bible, the Holy Bible in English - Table of Contents"}]
          [:meta {:name "viewport" :content "width=device-width, initial-scale=1"}]
          [:link {:rel "stylesheet" :type "text/css" :href "styles.css"}]
          [:link {:rel "canonical" :href canonical}]]
        [:body
          [:div.content
            [:h1 "The King James Bible"]

            [:div#votd.votd]
            [:script "(function(w,d,t,u,v,i,n,l){w['VotdObject']=v;w[v]=w[v]||{};w[v].i=i;n=d.createElement(t),l=d.getElementsByTagName(t)[0];n.async=1;n.src=u;l.parentNode.insertBefore(n,l)})(window,document,'script','votd/votd.js','votd','votd');"]

            [:h2 "The Old Testament"]
            (->> m
