File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 159159 out-path
160160 (λ~>> (write-xml (feed type posts #:tag tag )))))
161161
162+ (define (build-sitemap posts)
163+ (define site-path "/sitemap.txt " )
164+ (eprintf "~a rendering <output>~a\n " (timestamp-string) site-path)
165+ (call-with-output-file*
166+ #:exists 'truncate/replace
167+ (reroot-path site-path output-dir)
168+ (λ (out)
169+ (for ([post (in-list posts)])
170+ (displayln (full-url (rendered-post-path post)) out)))))
171+
162172(define (build-all)
163173 (make-directory* build-dir)
164174 (make-directory* output-dir)
185195 (for ([posts (in-slice num-posts-per-page posts)]
186196 [page-number (in-naturals 1 )])
187197 (build-index-page total-pages page-number posts #:tag tag ))
188- (build-feeds posts #:tag tag )))
198+ (build-feeds posts #:tag tag ))
199+
200+ (build-sitemap all-posts))
189201
190202(module+ main
191203 (build-all))
You can’t perform that action at this time.
0 commit comments