Merge pull request #23 from ericsomdahl/master
Modification to allow the generated rss xml to pass xsd validation.
This commit is contained in:
commit
5ffd30895f
1 changed files with 5 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
||||||
(:import java.util.Date))
|
(:import java.util.Date))
|
||||||
|
|
||||||
|
|
||||||
(defn posts-to-items [site-url author posts]
|
(defn posts-to-items [site-url posts]
|
||||||
(map
|
(map
|
||||||
(fn [{:keys [uri title content date]}]
|
(fn [{:keys [uri title content date]}]
|
||||||
(let [link (str (if (.endsWith site-url "/") (apply str (butlast site-url)) site-url) uri)]
|
(let [link (str (if (.endsWith site-url "/") (apply str (butlast site-url)) site-url) uri)]
|
||||||
|
@ -13,8 +13,7 @@
|
||||||
:link link
|
:link link
|
||||||
:title title
|
:title title
|
||||||
:description content
|
:description content
|
||||||
:pubDate date
|
:pubDate date}))
|
||||||
:author author}))
|
|
||||||
posts))
|
posts))
|
||||||
|
|
||||||
(defn make-channel [config posts]
|
(defn make-channel [config posts]
|
||||||
|
@ -24,9 +23,8 @@
|
||||||
{:title (:site-title config)
|
{:title (:site-title config)
|
||||||
:link (:site-url config)
|
:link (:site-url config)
|
||||||
:description (:description config)
|
:description (:description config)
|
||||||
:lastBuildDate (Date.)
|
:lastBuildDate (Date.)})
|
||||||
:author (:author config)})
|
(posts-to-items (:site-url config) posts)))
|
||||||
(posts-to-items (:site-url config) (:author config) posts)))
|
|
||||||
|
|
||||||
(defn make-filtered-channels [public {:keys [rss-filters blog-prefix] :as config} posts-by-tag]
|
(defn make-filtered-channels [public {:keys [rss-filters blog-prefix] :as config} posts-by-tag]
|
||||||
(doseq [filter rss-filters]
|
(doseq [filter rss-filters]
|
||||||
|
|
Loading…
Reference in a new issue