How to use pagetrees with multiple output targets?
#82
Closed
opened 3 years ago by clarityflowers
·
2 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
So, pagetrees as they are set up ask you to list your pages as the final output name:
But, I have multiple output targets (in my case, html and gemtext), so I don't know if it's going to be
.html
or.gmi
until render time. I've spend a few hours hacking at this trying to get something working, but I'm really wondering if there's something obvious I'm missing.The pagetree can contain functions that generate its content, like any other Pollen file. (Indeed, it doesn’t even need to be written in
#lang pollen
, if you find#lang racket
easier for the purpose.You could set up the pagetree so that all the extensions are change to
html
orgmi
based on thecurrent-poly-target
.Or going the other direction — you could make two pagetrees, one for
html
and one forgmi
, that are derived from a common set of source names.This set of source names could either be manually updated, or automatically generated.
I see, that's where basically where I ended up, but I wanted to make sure there wasn't something simpler. Thank you!