(index ("source-dir" 0) ("layouts-dir" 138) ("output-dir" 277) ("default-layouts" 423) ("clean-before-build" 613) ("excluded-paths" 797) ("default-extension" 1008) ("default-page-vars" 1211) ("page-eval-env" 2289) ("uri-path-prefix" 2688) ("shortcut-links" 2855) ("ignore-page?" 3644) ("ignore-page?" 3964) ("pages" 4035) ("page-by-path" 4456) ("current-page" 4687) ("page-path" 4818) ("page-source-path" 4937) ("page-vars" 5100) ("page-type" 5223) ("read-page" 5561) ("translate-sxml" 6129) ("translate-scss" 6129) ("translate-markdown" 6129) ("translate-svnwiki" 6129) ("translators" 6515) ("make-external-translator" 7409) ("define-hyde-environment" 8215) ("pathify" 8808) ("sxml-conversion-rules" 9073) ("serve-page" 9265) ("$" 9702) ("contents" 10023) ("around-page-translate" 10149) ("page-serve-handler" 10624))
(def (sig (parameter "(source-dir [dir])" (id source-dir))) (p "The directory in which source pages are kept. Default: " (tt "\"src\"")))
(def (sig (parameter "(layouts-dir [dir])" (id layouts-dir))) (p "The directory in which layouts are kept. Default: " (tt "\"layouts\"")))
(def (sig (parameter "(output-dir [dir])" (id output-dir))) (p "The directory compilation results will be written to. Default: " (tt "\"out\"")))
(def (sig (parameter "(default-layouts [layouts])" (id default-layouts))) (p "A list of default layouts which are applied when no other is specified. Default: " (tt "'(\"default.sxml\")")))
(def (sig (parameter "(clean-before-build [bool])" (id clean-before-build))) (p "Indicates whether to purge the " (tt "output-dir") " before compilation or not. Default: " (tt "#t")))
(def (sig (parameter "(excluded-paths [regexes])" (id excluded-paths))) (p "A list of regular expressions matching paths which are to be ignored when compiling. Default: " (tt "`(,(irregex (seq \"~\" eos)))")))
(def (sig (parameter "(default-extension [extension])" (id default-extension))) (p "The file extension to use for compiled pages which don't explicitly specify an extension. Default: " (tt "\"html\"")))
(def (sig (parameter "(default-page-vars [page-vars])" (id default-page-vars))) (p "An alist which maps either (ir)regexps or procedures to page-vars. Each page has its " (tt "page-source-path") " matched against the (ir)regexps or is passed to the procedure. If it matches or returns non-" (tt "#f") ", the respective page-vars are appended to the page's local page-vars, i.e. local page-vars have precedence over them.  Default: " (tt "'()")) (p "Example:") (p "The following " (tt "default-page-vars") " would set the " (tt "layouts") " page-var to " (tt "(\"page.sxml\" \"default.sxml\")") " for all " (tt ".sxml") " pages with the relative path prefix " (tt "pages/") " and the page-vars " (tt "tags") " to " (tt "(awful)") " for all pages containing the word \"cool\":") (highlight scheme "(default-page-vars `(((seq bos \"pages/\" (+ any) \".sxml\" eos)\n                      (layouts \"page.sxml\" \"default.sxml\"))\n\n                     (,(lambda (page)\n                        (irregex-search \"cool\" (read-page page)))\n                      (tags awful))))"))
(def (sig (parameter "(page-eval-env [env])" (id page-eval-env))) (p "The environment for evaluating SXML and SCSS pages. It needs to be an environment created via the " (tt "hyde-page-eval-env") " module which is a (mostly) drop-in replacement for the deprecated " (int-link "/egg/environments" "environments egg") ". Note that the top-level environment is always used as a fallback for lookup."))
(def (sig (parameter "(uri-path-prefix [path])" (id uri-path-prefix))) (p "A string that is prepended to all pages' " (tt "page-path") ". Default: " (tt "\"\"") "."))
(def (sig (parameter "(shortcut-links [shortcuts])" (id shortcut-links))) (p "An alist of shortcut names (symbols) mapping to URI templates containing " (tt "format") " placeholders. These shortcuts can be used with the following page translators:") (dl (dt "svnwiki") (dd "The " (tt "[[link]]") " syntax is extended to allow shortcuts to be used by prefixing the path with the shortcut name and a colon, for example: " (tt "[[foo:something]]") " will use the " (tt "foo") " shortcut and substitute the first placeholder with " (tt "\"something\"") ".") (dt "sxml") (dd "The transformation rule " (tt "shortcut") " can be used to expand a shortcut name into a URI, for example: " (tt "(a (@ (href (shortcut foo \"something\"))))") ".")) (p "This feature has been added in version 0.12."))
(def (sig (parameter "(ignore-page? [predicate])" (id ignore-page?))) (p (tt "predicate") " is a procedure accepting a page; when it returns " (tt "#t") " that page will not be compiled to an output file (it can still be accessed through " (tt "pages") " though).") (p "This parameter has been added in version 0.16."))
(def (sig (parameter "(ignore-page? [predicate])" (id ignore-page?))))
(def (sig (parameter "pages" (id pages))) (p "An alist of all available pages indexed by their source file names relative to " (tt "(source-dir)") ". The values are " (tt "page") " records. Note that it is only bound during site compilation, i.e. not yet when " (tt "hyde.scm") " is loaded.") (p "This used to be a constant up until version 0.13 and was only available in the " (tt "page-eval-env") " up until 0.20.0."))
(def (sig (procedure "(page-by-path path)" (id page-by-path))) (p "Looks up a page by its target " (tt "path") " (i.e. " (tt "page-path") "), which can be given as a string or a list of strings representing the path components."))
(def (sig (procedure "(current-page)" (id current-page))) (p "Returns the current page's record. Only bound during compilation."))
(def (sig (procedure "(page-path page)" (id page-path))) (p "Returns the given " (tt "page") "'s absolute URI path."))
(def (sig (procedure "(page-source-path page)" (id page-source-path))) (p "Returns the given " (tt "page") "'s source path relative to " (tt "(source-dir)") "."))
(def (sig (procedure "(page-vars page)" (id page-vars))) (p "Returns the given " (tt "page") "'s page-vars as an alist."))
(def (sig (procedure "(page-type page)" (id page-type))) (p "Returns the given " (tt "page") "'s type which is one of the following symbols:") (dl (dt "dynamic") (dd "a page which is handled by one of Hyde's page translators") (dt "static") (dd "a page which is just copied to " (tt "(output-dir)")) (dt "directory") (dd "a directory")))
(def (sig (procedure "(read-page page #!rest layouts)" (id read-page))) (p "Returns the given " (tt "page") "'s contents, possibly wrapped in the given " (tt "layouts") ". " (tt "page") " may be either a " (tt "page") " record or a path relative to " (tt "(source-dir)") ". This procedure is useful to create aggregate pages. Note that it will translate the contents of dynamic " (tt "page") "s even if they have not been compiled, yet. In this case, they will neither be wrapped in page-specific nor the default layouts, only the ones given in " (tt "layouts") "."))
(def (sig (procedure "(translate-sxml)" (id translate-sxml)) (procedure "(translate-scss)" (id translate-scss)) (procedure "(translate-markdown)" (id translate-markdown)) (procedure "(translate-svnwiki)" (id translate-svnwiki))) (p "Translators for SXML, SCSS, Markdown and svnwiki formatted pages. See " (tt "translators") " parameter for which files extensions they are mapped to."))
(def (sig (parameter "(translators [translators-alist])" (id translators))) (p "An alist of source language translators indexed by file extensions. Default:") (highlight scheme "    `((\"sxml\" ,translate-sxml) \n      (\"scss\" ,translate-scss (ext . css) (layouts))\n      (\"md\"   ,translate-markdown)\n      (\"wiki\" ,translate-svnwiki)\n      (\"sw\"   ,translate-svnwiki))") (p "Additionally, " (tt "`(\"atom\" ,translate-atom (ext . atom) (layouts))") " can be made available by loading the " (tt "hyde-atom") " extension from your site's " (tt "hyde.scm") ".") (p "To use " (int-link "/egg/lowdown" "Lowdown") " for " (link "http://daringfireball.net/projects/markdown/" "Markdown") " pages you need to define a custom page translator in your site's " (tt "hyde.scm") " like this:") (highlight scheme "(use lowdown)\n(translators (cons (list \"md\" markdown->html) (translators)))"))
(def (sig (procedure "(make-external-translator program-name [args])" (id make-external-translator))) (p "Creates a procedure that reads from " (tt "(current-input-port)") " and writes to the standard input of the external program " (tt "program-name") " (either a string or a thunk returning a string). Optionally a thunk can be passed for " (tt "args") " which needs to return a list of arguments for the program. The program's standard output is read back and written to " (tt "(current-output-port)") ". It can be used to create page translators for external programs, e.g. the markdown translator included in Hyde is defined like this:") (highlight scheme "(define translate-markdown (make-external-translator markdown-program))\n(translators (cons (list \"md\" translate-markdown) (translators)))"))
(def (sig (syntax "(define-hyde-environment name body ...)" (id define-hyde-environment))) (p "Defines an environment " (tt "name") ". The " (tt "body") " expressions are only evaluated when " (tt "hyde") " is executed with " (tt "-e [name]") ". This is useful to set different parameters for different scenarios or deployment locations. If no " (tt "-e") " option is set, the " (tt "default") " environment is used. Just " (tt "(define-hyde-environment default ...)") " to override it. See " (int-link "#available-commands" "Available Commands") " for which commands respect environments."))
(def (sig (procedure "(pathify string)" (id pathify))) (p "Turn " (tt "string") " into a URL friendly path name.") (p "Example:") (highlight scheme "(pathify \"This is \\\"something\\\" nice.\") ; => \"this-is-something-nice\"") (p "Exported since version 0.16."))
(def (sig (constant "sxml-conversion-rules" (id sxml-conversion-rules))) (p "The set of SXML conversion rules used for translating " (tt "sxml") " pages.") (p "Exported since version 0.15."))
(def (sig (procedure "(serve-page page path continue)" (id serve-page))) (p "Default handler for the " (tt "hyde serve") " command which translates dynamic pages when requested by their target path and tries to serve index files for directories as defined via " (int-link "/egg/spiffy" "Spiffy") "'s " (tt "index-files") " parameter. Static files are handled by Spiffy's default handler.") (p "See also " (tt "page-serve-handler") "."))
(def (sig (procedure "($ page-var #!optional page)" (id $))) (p "Returns the value of " (tt "page-var") " (a symbol identifiying the page-var) or " (tt "#f") " if no " (tt "page-var") " of that name exists. By giving the optional " (tt "page") " argument, refer to that page's page-vars instead of the current page's."))
(def (sig (constant "contents" (id contents))) (p "The translated contents of the current page. Only available in layouts."))
(def (sig (parameter "around-page-translate" (id around-page-translate))) (p "A procedure that is called for every page translation. It needs to accept the following arguments:") (dl (dt (tt "page")) (dd "The page being translated") (dt (tt "translate")) (dd "A thunk which returns the translation result")) (p "The procedure needs to return the translation result. Default:") (highlight scheme "(lambda (page translate) (translate))") (p "Available since version 0.21.0."))
(def (sig (parameter "page-serve-handler" (id page-serve-handler))) (p "A procedure that is called for every request handled by " (tt "hyde serve") ". It needs to accept the following arguments:") (dl (dt (tt "page")) (dd "The requested page or " (tt "#f") " if none was found for the requested path") (dt (tt "path")) (dd "The requested path represented as a list of strings") (dt (tt "continue")) (dd "A thunk to be called in case no response was sent")) (p "The procedure should either send a response (e.g. via " (int-link "/egg/spiffy" "Spiffy") "'s " (tt "send-response") " procedure) or call the " (tt "continue") " thunk. The default is " (tt "serve-page") ".") (p "Available since version 0.21.0."))
