Thanks to Kyle and Martin for looking at this problem and replying!
Strategies like the ones you mention do get me part of the way to my
goal. For instance, I think I wrote the exact same function as Martin's
`filterByType` except I call it `onlyItemsForSubblog`:
https://github.com/ohbadiah/nickmcavoy-dotcom/blob/cross-subblog/blog/src/Nick/Subblogs.hs#L18
I also think it's really interesting how Kyle creates a Compiler
directly from Context.
However, I think all of that only gets me aggregate views of the posts
from manipulating an entire list of items, as in my `processSubblogIndex`:
https://github.com/ohbadiah/nickmcavoy-dotcom/blob/cross-subblog/blog/src/Main.hs#L241
Ultimately though I think I still need something other than `create` and
`match` for compiling each blog post itself to versions in multiple
subblogs. The plan is to map each file that matches a glob to multiple
compiled output locations based on Metadata. `create` won't do this
because it doesn't glob; you just specify the output route. `match` will
I believe map each globbed file to exactly one compiled output location,
but not more or less than one.
My little `matchMetadata` maps each globbed file to either zero or one
output locations, which combined with forM_ gives me the one-to-many
functionality I seek:
https://github.com/ohbadiah/nickmcavoy-dotcom/blob/cross-subblog/blog/src/Main.hs#L104
With further thought I think one way I might be able to do this without
modifying Hakyll is to leverage `create` rather than `match:` I could
generate the list of output routes for each blog post for each of its
subblogs and then `create` Rules for each item in those lists. It might
not be too much worse than the links list I figured out how to put in
Context this weekend:
https://github.com/ohbadiah/nickmcavoy-dotcom/blob/cross-subblog/blog/src/Nick/Subblogs.hs#L28
So maybe that would work, but the glory of open source software is there
isn't anything stopping me from building and using a version of Hakyll
with my `matchMetadata` in the short term.
Finally, I should note that this is rather a lot of gymnastics in order
to support behavior just a little bit different from the Categories that
are already baked in to Hakyll. That's the fun of hacking around,
though; whatever user experience I wish to have as a blogger, that's the
one that I can build as a hacker!
Thanks again to both of you for your help. Let me know if I'm missing
something.
Nick