5.1 Core
| (require punct/core) | package: punct-lib |
parameter
(current-metas) → (or/c hash-eq? #f)
(current-metas metas) → void? metas : (or/c hash-eq? #f)
A parameter that, during compilation of a Punct source, holds the metadata hash table for that file.
The final value of this parameter becomes the value of document-metas for that file’s
doc as well as its metas export.
The only key automatically defined in every metadata table is 'here-path, which holds the absolute path to the source file.
If no Punct file is currently being compiled, this parameter will hold #f by default. In particular, this parameter is not automatically set to a Punct file’s metas during the rendering phase (e.g., doc->html).
procedure
key : symbol? val : (not/c procedure?)
Set the value of key in current-metas to val. If there are no current
metas, an ugly exception is thrown.
syntax
(? key val-expr ...)
Within a Punct file, this macro can be used as shorthand for set-meta. Each key
is given as a bare identifier (i.e., without using quote).
#lang punct •?[title "Example Title" author "Me"] ...