I have a blog-style website that I wish to turn into a book. I have a (:pagelist:) directive that generates a sorted list of blog entries and want to typeset this as if it were a wiki trail. Is it possible to treat a dynamically-generated page list like a static trail for publishing purposes?
This recipe makes it relatively easy! It takes advantage of an option in the (:typeset-book:) directive that allows us to use a custom “extract trail stops” function to build our own trail.
When you press the Typeset Book button, you should get a book of the blog.
The recipe extracts trail stops from the raw wiki markup returned by (:pagelist:) — that is, it looks for lines starting with list item markup (one or more * or # characters). This means wiki markup embedded in the pagelist format instructions is not processed. However, Page Lists often need conditional directives to produce the desired output. For example, the blog book may want to have a new chapter for each month, with a section for each day. So typically, pagelist format instructions contain one or more (:if:) directives. The recipe therefore processes any conditional text markup to create a list in the author’s expected format.
If the administrator needs other wiki markup rules to be interpreted before passing the list to the function that extracts trail stops, this will require a custom version of the recipe.