 (defn disclosure
   [posts]
   (-> posts
-      (base)
+      (common)
       (assoc-in [:page-data :active] "about")
       (assoc :content (-> "disclosure.md"
                           (markdown-page)

(defn archives
  [posts]
  (-> posts
      (base)
      (assoc-in [:page-data :active] "archives")
      (assoc :content (assoc generic-page :title "Archives")
             :posts-data (blog/data-for-archives posts))))

                 (map :author)
                 set
                 count)
   :lines (->> posts
               (map :line-count)
               (reduce +))
   :words (->> posts
               (map :word-count)
               (reduce +))
   :chars (->> posts
               (map :char-count)
               (reduce +))})

(defn base
  []
  {:page-data {:base-path "/blog"
               :site-title (config/name)
               :site-description (config/description)
               :index "index"
               :about "about"
               :community "community"
               :archives "archives"
               :categories "categories"
               :tags "tags"
               :authors "authors"
               :active nil}})

(defn common
  ([]
    (common {}))
  ([posts]
    (assoc (base)
           :posts-data posts
           :posts-stats (posts-stats posts))))

(def generic-page
  {:title nil
