chickadee » hyde » default-page-vars

default-page-vars #!optional page-varsparameter

An alist which maps either (ir)regexps or procedures to page-vars. Each page has its page-source-path matched against the (ir)regexps or is passed to the procedure. If it matches or returns non-#f, the respective page-vars are appended to the page's local page-vars, i.e. local page-vars have precedence over them. Default: '()


The following default-page-vars would set the layouts page-var to ("page.sxml" "default.sxml") for all .sxml pages with the relative path prefix pages/ and the page-vars tags to (awful) for all pages containing the word "cool":

(default-page-vars `(((seq bos "pages/" (+ any) ".sxml" eos)
                      (layouts "page.sxml" "default.sxml"))

                     (,(lambda (page)
                        (irregex-search "cool" (read-page page)))
                      (tags awful))))