소스 검색

Added file-arguments to index-writer

master
Vincent Truchseß 1 년 전
부모
커밋
ba77921133
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. +7
    -4
      src/proton/writers.clj

+ 7
- 4
src/proton/writers.clj 파일 보기

@@ -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)))))

불러오는 중...
취소
저장