Re: [hakyll] Hakyll 4 metaCompiler

52 views
Skip to first unread message

Jasper Van der Jeugt

unread,
May 15, 2013, 6:26:36 AM5/15/13
to hakyll
Hello Andy,

I'm not sure on what `makeRevisionCompiler` does. I think I'd need to
see a bit more code to give a proper suggestion, is the code of your
site available online somewhere?

Generally, you would use `preprocess` in this case, but as I said, I
can't be entirely sure at this point.

Hope this helps,
Peace,
Jasper

On Mon, Apr 29, 2013 at 8:09 PM,
<greatestdevel...@googlemail.com> wrote:
> Hi,
>
> I'm in the process of updating soem code from Hakyll 3 to 4.2 (which has
> generally gone pretty well), but there's one thing I'm not 100% clear on.
>
> In Hakyll 3, I was doing something like this:
>
> _ <- ($) match "articles/*" $ do {blah blah blah, some code here}
>
>
> group "diffs" $ match "posts/*" $
> metaCompileWith "diffs" $ requireAll_ "posts/*"
> >>> mapCompiler makeRevisionCompiler
> match "diffs/*" $ route $( gsubRoute "diffs/" (const "posts/diffs/")
> `composeRoutes` setExtension "html")
>
>
> So, I was basically processing my posts twice, creating a second version,
> and then routing based on that identifier.
>
> It's not obvious to me how I can do this in Hakyll 4, because the
> metaCompiler is no longer available. I can create another version when I
> match on the posts, but I can't route it as I haven't run the compiler yet,
> which is what creates the filename.
>
> Any suggestions?
>
> Cheers,
>
> Andy
>
> --
> You received this message because you are subscribed to the Google Groups
> "hakyll" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hakyll+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages