Changeset 20543 in project for gazette/hyde.scm


Ignore:
Timestamp:
09/27/10 17:12:27 (10 years ago)
Author:
Moritz Heidkamp
Message:

gazette: add dates and authors to archive and reverse its ordering; fix a bug in the default-page-vars regexp for issue layouts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gazette/hyde.scm

    r20447 r20543  
    11(use hyde hyde-atom environments)
    22
    3 (default-page-vars '(((: bos "issues/" (+ any) ".wiki")
     3(default-page-vars '(((: bos "/issues/" (+ any) ".html")
    44                      (layouts "article.sxml" "default.sxml"))))
    55
     
    1919  (time->string (seconds->utc-time seconds) "%Y-%m-%d %z"))
    2020
     21(define (authors->sxml authors)
     22  `(,(car authors)
     23    ,@(if (null? (cdr authors))
     24          '()
     25          (map (lambda (author)
     26                 `(,(car author) (span (@ (class "author")) ,(cdr author))))
     27               (append (map (cut cons ", " <>) (butlast (cdr authors)))
     28                       `((" and " . ,(last authors))))))))
     29
    2130(for-each (lambda (binding)
    2231            (apply environment-extend! (cons (page-eval-env) binding)))
    2332          `((page-updated ,page-updated)
    2433            (format-seconds ,format-seconds)
     34            (authors->sxml ,authors->sxml)
    2535            (all-issues ,(lambda ()
    2636                           (sort-by (pages-matching "issues/.+") page-updated)))))
Note: See TracChangeset for help on using the changeset viewer.