X-Git-Url: https://git.jsancho.org/?p=blog.git;a=blobdiff_plain;f=haunt.scm;h=21cb4ce8d49334440610e820671ac108e5750e51;hp=d6e58c38269abd74ec59144ab81adb821ea3e34f;hb=refs%2Fheads%2Fspanish;hpb=8ce4f8b6d0783ae1054495c487d244e3f97dd0ba diff --git a/haunt.scm b/haunt.scm index d6e58c3..21cb4ce 100644 --- a/haunt.scm +++ b/haunt.scm @@ -33,9 +33,13 @@ `(" " (span (@ (style "margin: 0 3px")) ⦿) (span (@ (class "tags")) - ,@(map (lambda (tag) - `((a (@ (href ,(format #f "tags/~a.html" tag))) ,tag) " ")) - tags))))) + ,@(drop-right + (apply + append + (map (lambda (tag) + `((a (@ (href ,(format #f "tags/~a.html" tag))) ,tag) ", ")) + tags)) + 1))))) (else div)))) @@ -62,7 +66,8 @@ (li (@ (id "blog-title-header")) (a (@ (href "index.html")) (h1 ,(assoc-ref metadata 'author))))) - (ul (@ (class "navigation-items center"))) + (ul (@ (class "navigation-items center")) + (li (a (@ (href "https://en.jsancho.org/")) "in english"))) (ul (@ (class "navigation-items right")) ,@(map (lambda (page) `(li (a (@ (href ,(cdr page))) ,(car page)))) @@ -85,14 +90,18 @@ (site-post-slug site post) ".html")) (define (get-paragraphs sxml count) - (let ((pars (filter - (lambda (e) (and (pair? e) (eq? (car e) 'p))) - sxml))) - (list-head pars (min count (length pars))))) + (define (getp sxml count res) + (cond ((or (= count 0) (null? sxml)) + res) + ((and (pair? (car sxml)) (eq? (caar sxml) 'p)) + (getp (cdr sxml) (- count 1) (cons (car sxml) res))) + (else + (getp (cdr sxml) count (cons (car sxml) res))))) + (reverse (getp sxml count '()))) (define (post-summary post) (or (post-ref post 'summary) - (get-paragraphs (cdr (post-sxml post)) 3))) + (get-paragraphs (cdar (post-sxml post)) 3))) `( ,@(map (lambda (post) @@ -127,7 +136,7 @@ (site #:title "Javier Sancho" #:domain "jsancho.org" - #:build-directory "site-spanish" + #:build-directory "site" #:default-metadata '((author . "Javier Sancho") (description . "Evangelizador del software libre - Programador")