From: Javier Sancho Date: Sun, 29 Jan 2017 19:36:40 +0000 (+0100) Subject: Show tags in every post X-Git-Url: https://git.jsancho.org/?p=blog.git;a=commitdiff_plain;h=664380eb29e50a662df9374ed6d41910605b2054;hp=2f76ef2e481d7eb602d592d81deaa026be8301e6;ds=sidebyside Show tags in every post --- diff --git a/haunt.scm b/haunt.scm index 07b2a79..068f123 100644 --- a/haunt.scm +++ b/haunt.scm @@ -46,15 +46,23 @@ " " (li (a (@ (class "sc-rss") (target "_blank") (href "/feed.xml")) (i (@ (class "fa fa-rss"))))))))) (main ,body)))) + #:post-template (lambda (post) + (define (get-tags post) + (or (assoc-ref (post-metadata post) 'tags) '())) + `((article (@ (class "single")) (header (h1 ,(post-ref post 'title)) (p ,(date->string* (post-date post)))) ,(post-sxml post) (div (@ (class "tag-cloud")) - (p (a (@ (href "")) "prueba")))))) + (p + ,@(map (lambda (tag) + `((a (@ (href "")) ,tag) " ")) + (get-tags post))))))) + #:collection-template (lambda (site title posts prefix) (define (post-uri post)