@@ -6,10 +6,11 @@ @(require "scribble-helpers.rkt" scribble/example) @(require (for-label "../pollen.rkt" "../dust.rkt" + "../cache.rkt" racket/base racket/contract txexpr sugar/coerce pollen/tag @@ -18,11 +19,11 @@ pollen/core)) @(define dust-eval (make-base-eval)) @(dust-eval '(require "dust.rkt" txexpr)) -@title{@filepath{dust.rkt}} +@title{Dust} @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 @@ -142,18 +143,26 @@ (first-words txs-parens-commas 5) (first-words txs-short 5) ] @section{Article parsers and helpers} + +@defparam[listing-context ctxt (or/c 'blog 'feed 'print "") #:value ""] + +A parameter specifying the current context where any listings of articles would appear. Its purpose +is to allow articles to exclude themselves from certain special collections (e.g., the blog, the RSS +feed, print editions). Any article whose @code{conceal} meta matches the current context will not be +included in any listings returned by the listing functions in +@seclink["cache-rkt"]{@filepath{cache.rkt}}. @defproc[(default-title [body-txprs (listof txexpr?)]) string?] Given a list of tagged X-expressions (the elements of an article’s doc, e.g.), returns a string containing a suitable title for the document. (Uses @racket[first-words].) -Titles are not required for articles, but there are contexts where you need something that -serves as a title if one is not present, and that’s what this function supplies. +Titles are not required for articles, but there are contexts where you need something that serves as +a title if one is not present, and that’s what this function supplies. @examples[#:eval dust-eval (define doc '(root (p "If I had been astonished at first catching a glimpse of so outlandish an " "individual as Queequeg circulating among the polite society of a civilized "