Changeset 31331 in project


Ignore:
Timestamp:
09/04/14 19:35:03 (5 years ago)
Author:
Moritz Heidkamp
Message:

hyde: Add before-page-serve hook and export all page record accessors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/hyde/trunk/hyde.scm

    r29166 r31331  
    2525 link-shortcuts
    2626 sxml-conversion-rules
    27  ignore-page?)
     27 ignore-page?
     28 before-page-serve
     29
     30 page?
     31 page-source-path
     32 page-path
     33 page-vars
     34 page-reader
     35 page-writer
     36 page-type)
    2837
    2938(import chicken scheme)
     
    251260                                            (pathname-extension (page-path page)))))))
    252261
     262(define before-page-serve
     263  (make-parameter values))
     264
    253265(define (serve)
    254266  (root-path (source-dir))
    255  
    256267  (vhost-map `((".*" .
    257268                ,(lambda (continue)
     
    260271                      (let* ((path (cdr (uri-path (request-uri (current-request)))))
    261272                             (page (page-by-path path)))
    262 
     273                        (when page
     274                          ((before-page-serve) page))
    263275                        (case (and page (page-type page))
    264276                          ((dynamic) (send-page page))
    265 
    266277                          ((directory)
    267278                           (call/cc (lambda (break)
Note: See TracChangeset for help on using the changeset viewer.