Has anyone tried to use Butterick's Pollen and written about it? The idea of debugging your website with racket as you write markup and styles seemed really interesting alternative to what I do; write styles, refresh, and then refine the stylesheet by incrementally adding changes with the inspector and then copying them to my stylesheet.
I'm working on converting a fiction ebook to web-based with Pollen and may later launch a fiction magazine using it, although I'm undecided about that technology choice.
I think Pollen's biggest strength is that you can reprogram its markup -- as its documentation puts it, you can attach behavior to tags. I haven't taken much advantage of that yet, but you can do things like create a "TOC" tag that builds a table of contents by inspecting child documents and looking for h1 tags (or looking for, say, "chapter" tags, which you've defined to expand to "<h1 class='chapter'>"), or inspect the contents of paragraphs and subtly shift the first line margin to the left if the first character is a quote mark (which Butterick's Practical Typography does). You could replicate some of that with a template language that allows user-definable tags, but I don't think you could do all of it.
Its biggest weakness, at least for me, has been finding a pleasant workflow. Despite having a built-in web server it feels kind of clunky compared to other static site generators. You're largely on your own for writing a deployment script ("raco pollen clone" is not a valid substitute). The DrRacket IDE is virtually a requirement for Racket programming, but it sucks teabags for editing long prose documents; you'll likely find yourself working in one editor for Racket language files and another for Pollen source. This isn't necessarily a dealbreaker, but it's at the least annoying.
FWIW I go between DrRacket and Sublime Text as necessary. Sublime is of course faster for typical writing & editing tasks. But when working on code-related things, the DrRacket REPL is useful.
That makes sense. I think I was using Sublime as well -- I experimented with making the world's hackiest syntax highlighting file to show embedded Pollen commands. (IIRC, Sublime was unamused with the notion of ".html.pmd" as a single extension.)
Thanks for the response. I might try converting some public domain text to Pollen sometime, any tips for getting around DrRacket's short comings besides separating racket and pollen source?
That's probably the main one, really. DrRacket really isn't a bad IDE -- it's not up to Emacs levels of programmable madness, but its keybindings are clearly inspired by Emacs and it has a lot of Lisp-aware functionality. But, its syntax highlighting engine seems to be very slow and hard to really turn off.
If you are an Emacs fan, you can use it for Racket instead of DrRacket using Geiser and Quack, which might solve a lot of problems. (I've never tried it -- I'm comfortable with Emacs, but I've never loved the way it handles prose rather than code.)
I'm working through the admittedly beautiful and very thorough documentation [1].
It's a very simple idea, really: you write your document and sprinkle racket s-expressions wherever you want. You can put your definitions at the top of your document, or in another file. You describe your templates in Racket also, because like Butterick says in his RacketCon video [2], "S-expressions and XML are the same thing". You can use tags that you haven't defined, they just get placed in the resulting HTML.
You still have to roll your own CSS and any JavaScript. As far as I can tell it doesn't help you out with things like keeping track of footnotes numbering or citations and such: you roll your own for things like this, Pollen is no LaTeX. This is partly why I say it's a really simple system. It makes a certain set of web authoring things simple, but it doesn't try to be a one-stop shop, which is excellent because this makes it a supremely flexible tool.
It also has some backend fancy sauce where you can save your file and refresh the page [3]. Also I admit I'm not really a big fan of DrRacket: I've just been using it for the tutorials because I have no idea what to expect from Racket, but I'm slowly moving to Emacs, and Racket seems to work fine there.
Definitely worth checking out Pollen if only to get a light introduction to the thoroughness of Racket documentation (they definitely do things differently in Racket-land!), but stay for the tools you need to roll your own ultimate static blog generator.
(Also, completely unrelated: cool video and cool title at another RacketCon 2013 talk: "Racket on the Playstation 3? It's Not What you Think!" [4].)
> You still have to roll your own CSS and any JavaScript
True, though you can automate those files (and any other text-based files) with Pollen as well, so you can use common functions and data across all of them.
Also, here's the previous discussion of Pollen on HN:
The documentation is an absolute pleasure to read. I think I'm beginning to understand the use case for it more. I would definitely choose it if I had a large source text that I wanted to publish. I have to write the docs for a project I'm working on right now, maybe I'll get a chance to play with Pollen then.
It started as just an attempt to create the game of life in react, but as I started to add some interactivity to it, I started to wonder if there was an actual game in there somewhere. Never really figured out what I wanted to do with it though.