add note about ability to use other #langs as Pollen source files

pull/58/head
Matthew Butterick 9 years ago
parent c5a632f848
commit 67bd2d1111

@ -38,12 +38,14 @@ There are no undefined commands in Pollen. If a command has not already been def
@subsection{Standard exports}
By default, every Pollen source file exports two symbols, which you can access by using the source file with @racket[require]:
By default, every Pollen source file exports two identifiers, which you can access by using the source file with @racket[require]:
@racket['doc] contains the output of the file. The type of output depends on the source format (documented below).
@racket['metas] is a hash of keyvalue pairs with extra information that is extracted from the source. These @racket['metas] will always contain the key @racket['here-path], which returns a string representation of the full path to the source file. Beyond that, the only @racket['metas] are the ones that are specified within the source file (see the source formats below for more detail on how to specify metas).
@margin-note{The Pollen rendering system relies on these two identifiers, but otherwise doesn't care how they're generated. Meaning, the code inside your Pollen source file could be @litchar{#lang racket} or @litchar{#lang whatever}. As long as you manually @racket[provide] those two identifiers and follow the usual file-naming convention, your source file will be usable.}
@bold{How is this different from Racket?} In Racket, you must explicitly @racket[define] and then @racket[provide] any values you want to export.
@subsection{Custom exports}

Loading…
Cancel
Save