 
 (defn static
   {:summary "Generate static HTML, CSS, JavaScript, and other resources for the books of the bible."
-   :doc "usage: biblecli static [--parser <parser>] [--input <input-path>] <output-path>
+   :doc "usage: biblecli static [--parser <parser>] [--input <input-path>] [-canonical <url>] [-baseurl <url>] <output-path>
    --parser <parser>      Parser. Defaults to '{{default-parser}}'.
    --input <input-path>   Input path. Defaults to '{{default-parser-input}}'.
+   --canonical <url>      The canonical url. Defaults to https://kingjames.bible.
+   --baseurl <url>        The base url. Defaults to https://beta.kingjames.bible.
    <output-path>          Output directory to place the resource files."
-   :cmdline-opts {:string ["parser" "input"]
+   :cmdline-opts {:string ["parser" "input" "baseurl" "canonical"]
                   :default {:parser nil
-                            :input nil}}}
-  [{parser :parser input :input output-dir :_}]
+                            :input nil
+                            :baseurl "https://beta.kingjames.bible"
+                            :canonical "https://kingjames.bible"}}}
+  [{parser :parser input :input output-dir :_ baseurl :baseurl canonical :canonical}]
   (if (not= (count output-dir) 1)
     (throw "Must have exactly one <output-path> parameter."))
   (let [parser (or parser (u/default-parser))

            [: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 https://kingjames.bible"]]
            [:script {:type "text/javascript" :src "hiliter.js"}]]]])))

(defn next-chapter [all-chapters i]

        output-dir (first output-dir)]
    (write! output-dir "styles.css" (style))
    (write! output-dir "hiliter.js" (js))
    (write! output-dir "robots.txt" (robots baseurl))
    (write! output-dir "sitemap.xml" (sitemap all-chapters baseurl))
    (write! output-dir "7ce12f75-f371-4e85-a3e9-b7749a65f140.html" (toc m baseurl canonical))
    (dorun
      (map-indexed
        #(write!
          output-dir
          (rel-url %2)
          (chapter
            %2
            (prev-chapter all-chapters %1)
            (next-chapter all-chapters %1)
            baseurl
            canonical))
        all-chapters))))