◊(Local Yarn Code "Diff")

Differences From Artifact [14a49bec]:

To Artifact [d66853e3]:


13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

40

41
42
43










44
45
46
47
48
49
50
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

42
43


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60







+




















+
-
+

-
-
+
+
+
+
+
+
+
+
+
+







@(require (for-label "../pollen.rkt"
                     "../dust.rkt"
                     racket/base
                     txexpr
                     sugar/coerce
                     pollen/tag
                     pollen/setup
                     pollen/pagetree
                     pollen/core))

@(define dust-eval (make-base-eval))
@(dust-eval '(require "dust.rkt"))

@title{@filepath{dust.rkt}}

@defmodule["dust.rkt" #:packages ()]

This is where I put constants and helper functions that are needed pretty much everywhere in the
project. In a simpler project these would go in @seclink["pollen-rkt"]{@filepath{pollen.rkt}} but
here I have other modules sitting “behind” that one in the @tt{require} chain.

@section{Constants}

@defthing[default-authorname string? #:value "Joel Dueck"]

Used as the default author name for @code{note}s, and (possibly in the future) for articles
generally.

@deftogether[(@defthing[articles-path path-string? #:value "articles"]
@defthing[series-path/ path-string? #:value "series/"]
              @defthing[series-path   path-string? #:value "series"])]

The path of the folder that contains the Pollen documents defining Series, relative to the project’s
document root.
The path of the folder that contains the Pollen source documents for Articles and Series
respectively, relative to the project’s document root.

@deftogether[(@defthing[articles-pagetree pagetree?]
              @defthing[series-pagetree pagetree?])]

These are project-wide pagetrees: @racket[articles-pagetree] contains a pagenode for every Pollen
document contained in @racket[articles-path], and @racket[series-pagetree] contains a pagenode for
every Pollen document in @racket[series-path]. The pagenodes themselves point to the rendered
@tt{.html} targets of the source documents.

@section{Metas and @code{txexpr}s}

@defproc[(attr-present? [name symbol?] [attrs (listof pair?)]) boolean?]

Shortsightedly redundant to @code{attrs-have-key?}. Returns @code{#t} if @racket[_name] is one of
the attributes present in @racket[_attrs], otherwise returns @code{#f}.