56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
@defproc[(series-pagetree) pagetree?])]
These are project-wide pagetrees: @racket[articles-pagetree] contains a pagenode for every Pollen
document contained in @racket[articles-folder], and @racket[series-pagetree] contains a pagenode for
every Pollen document in @racket[series-folder]. The pagenodes themselves point to the rendered
@tt{.html} targets of the source documents.
@defproc[(here-output-path) path?]
Returns the path to the current output file, relative to @racket[current-project-root]. If no metas
are available, returns @racket[(string->path ".")]. This is like what you can get from the @tt{here}
variable that Pollen provides, except it is available outside templates.
@defproc[(here-id [suffix (or/c (listof string?) string? #f) #f]) string?]
Returns the 8-character prefix of the SHA1 hash of the current document’s output path. If no metas
are available, the hash of @racket[(string->path ".")] is used. If @racket[_suffix] evaluates to
a string or a list of strings, they are appended verbatim to the end of the hash.
|
|
>
|
|
>
|
>
>
>
>
>
>
>
>
>
>
>
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
@defproc[(series-pagetree) pagetree?])]
These are project-wide pagetrees: @racket[articles-pagetree] contains a pagenode for every Pollen
document contained in @racket[articles-folder], and @racket[series-pagetree] contains a pagenode for
every Pollen document in @racket[series-folder]. The pagenodes themselves point to the rendered
@tt{.html} targets of the source documents.
@deftogether[(@defproc[(here-output-path) path?]
@defproc[(here-source-path) path?])]{
Returns the path to the current output or source file, relative to @racket[current-project-root]. If
no metas are available, returns @racket[(string->path ".")].
For the output path, this is similar to the @tt{here} variable that Pollen provides, except it is
available outside templates. As to the source path, Pollen provides it via the @racket['here-path]
key in the current metas, but it is a full absolute path, rather then relative to
@racket[current-project-root].
}
@defproc[(checked-in?) boolean?]{
Returns @racket[#t] if the current article is checked into the Fossil repo, @racket[#f] otherwise.
}
@defproc[(here-id [suffix (or/c (listof string?) string? #f) #f]) string?]
Returns the 8-character prefix of the SHA1 hash of the current document’s output path. If no metas
are available, the hash of @racket[(string->path ".")] is used. If @racket[_suffix] evaluates to
a string or a list of strings, they are appended verbatim to the end of the hash.
|