Pārlūkot izejas kodu

Added file-arguments to index-writer

master
Vincent Truchseß pirms 1 gada
vecāks
revīzija
ba77921133
1 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  1. +7
    -4
      src/proton/writers.clj

+ 7
- 4
src/proton/writers.clj Parādīt failu

@@ -81,12 +81,15 @@
[template posts target]
(write-page template target (gen-postlist posts) "Archive"))

(defn write-index-with-posts [template index-template posts]
(defn write-index-with-posts
"Generates index.html from index.adoc. The page contains content from index.adoc
as well as a ist of the 10 most recent posts."
(let [page (ad/adoc-load "index.adoc")]
(write-page template "index.html" (index-template nil nil
([template index-template posts]
(write-index-with-posts template index-template posts "index.adoc" "index.html"))
([template index-template posts infile outfile]
(let [page (ad/adoc-load infile)]
(write-page template outfile (index-template nil nil
(:content page)
nil
{:postlist (gen-postlist posts 10)})
(:title page))))
(:title page)))))

Notiek ielāde…
Atcelt
Saglabāt