       (docs-routes public-protocol relative-root-url))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Documentation Generation
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; XXX Remove this section during work on CMR-4094, when it will no longer be
-;; used.
-
-(defn header
-  "Defines the header of the generated documentation page."
-  [title]
-  (format
-    "<!DOCTYPE html>
-     <html>
-     <head>
-       <meta charset=\"UTF-8\" />
-       <title>%s</title>
-         <!--[if lt IE 9 ]>
-           <script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script>
-           <![endif]-->
-           <link rel=\"stylesheet\" href=\"bootstrap.min.css\">
-           <script src=\"jquery.min.js\"></script>
-           <script src=\"bootstrap.min.js\"></script>
-           <script>
-            // Display markdown generated tables with bootstrap styling.
-            // see http://getbootstrap.com/css/#tables
-            $(function(){ $(\"table\").addClass(\"table table-bordered table-striped table-hover table-condensed table-responsive\"); });
-           </script>
-       </head>
-       <body lang=\"en-US\">
-         <div class=\"container\">
-         <h1>%s</h1>"
-         title title))
-
-(def footer
-  "Defines the footer of the generated documentation page."
-  "</div></body></html>")
-
-(defn renderer
-  "Given a hash-map of HTML page data, renders a complete HTML page."
-  [data]
-  (str (header (:page-title data))
-       (:page-content data)
-       footer))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Core API Documentation Functions
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 


  ## Generating Documentation

  API documentation can be generated with the generate function in this namespace. You should add
  an alias to generate the documentation in the project.clj. Performance of running tasks in
  project.clj has been a problem. If you define an empty docs profile it will run much faster than
  in th default profile.

  Replace 'App Name' with the name of the application.

  ```
  :profiles {
    ;; This profile specifically here for generating documentation. It's faster than using the regular
    ;; profile. We're not sure why though. There must be something hooking into the regular profile
    ;; that's running at the end.
    ;; Generate docs with: lein with-profile docs generate-docs
    :docs {}}
  :aliases {\"generate-docs\" [\"exec\" \"-ep\" (pr-str '(do
                                                    (use 'cmr.common-app.api-docs)
                                                    (generate
                                                      \"CMR Foo\"
                                                      \"api_docs.md\"
                                                      \"resources/public/site/foo_api_docs.html\")))]
  ```"
  (:require
   [clojure.java.io :as io]

  (:import
   [org.pegdown PegDownProcessor
                Extensions]))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Utility Functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn default-renderer
  "This is the function used by default to render templates, given data that
  the template needs to render."
  [template-file data]
  (selmer/render-file template-file data))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Routing Setup
