Changeset 25868 in project


Ignore:
Timestamp:
02/05/12 21:01:23 (9 years ago)
Author:
Moritz Heidkamp
Message:

hyde: use big-chicken's module-environment when possible;, adapt to the new keyword-based find-files API; slightly prettify automatic path generation; apply patch by John J Foerch which fixes issues with trailing slashes in paths (thanks!)

Location:
release/4/hyde/trunk
Files:
2 edited

Legend:

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

    r23255 r25868  
    55 (license "BSD")
    66 (doc-from-wiki)
    7  (needs filepath environments sxml-transforms doctype matchable (scss 0.3) (spiffy 4.9) colorize intarweb (uri-common 1.2) svnwiki-sxml defstruct multidoc atom rfc3339)
    8  (files "hyde.meta" "hyde-atom.scm" "hyde.setup" "hyde.scm" "hyde-cmd.scm" "hyde.release-info"))
     7 (needs filepath environments sxml-transforms doctype matchable (scss 0.3) (spiffy 4.9) colorize intarweb (uri-common 1.2) svnwiki-sxml defstruct multidoc atom rfc3339 big-chicken))
  • release/4/hyde/trunk/hyde.scm

    r25415 r25868  
    8080(define current-page (make-parameter #f))
    8181(define pages (make-parameter '()))
    82 (define page-eval-env (make-parameter (environment-copy (interaction-environment) #t)))
     82(define page-eval-env
     83  (make-parameter
     84   (environment-copy
     85    (cond-expand
     86     (module-environments
     87      (module-environment 'big-chicken))
     88     (else
     89      (interaction-environment)))
     90    #t)))
    8391
    8492(define-syntax define-hyde-environment
     
    199207(define (pathify string)
    200208  (let* ((path  (string-downcase string))
    201          (path  (irregex-replace/all '(submatch (+ space)) path "-"))
    202          (path  (irregex-replace/all '(submatch (+ (~ alpha #\-))) path "")))
     209         (path  (irregex-replace/all '(submatch (+ (~ alpha #\- #\space))) path ""))
     210         (path  (irregex-replace/all '(submatch (+ (" -"))) path "-")))
    203211    (string-trim-both path #\-)))
    204212
     
    214222                   path
    215223                   (cons "" path)))
     224         (path (cons (car path)
     225                     (remove string-null? (cdr path))))
    216226         (path (string-join path "/"))
    217227         (path (if (string=? "" path) "/" path))
     
    388398
    389399  (find-files (source-dir)
    390               (conjoin (complement exclude-file?)
    391                        include-file?)
    392               (lambda (file _)
    393                 (pages (cons (classify-path file) (pages))))))
     400              test: (conjoin (complement exclude-file?)
     401                             include-file?)
     402              action: (lambda (file _)
     403                        (pages (cons (classify-path file) (pages))))))
    394404
    395405(define (compile-pages path-prefixes)
Note: See TracChangeset for help on using the changeset viewer.