Fork me on GitHub
#perun
<
2019-02-15
>
mariuene14:02:20

Hey, I have a small question. How do I access the global-metadata from a content-task ?

mariuene14:02:15

Also if you're missing a few hands I would love to help, been using perun for almost two years now.

jaide15:02:38

Hello https://github.com/hashobject/perun/blob/master/src/io/perun.clj#L859 loads the meta as part of the paths-fn then the renderer function applies it to the :rendered meta of each entry.

mariuene15:02:01

Okay, so for instance, I have a markdown task which uses the content-task and sends in a :passthru-fn which needs access to the global-meta, is there any built in way to access it?

jaide16:02:07

https://github.com/hashobject/perun/blob/master/src/io/perun.clj#L187 according to this the passthru-fn should be receiving global meta as the third argument.

mariuene16:02:43

Sorry i misspoke. I meant the :render-form-fn

jaide17:02:26

https://github.com/hashobject/perun/blob/master/src/io/perun.clj#L820 meta is passed to the render-form-fn which is a map with {:entry {} :entries [] :global-meta}

mariuene17:02:25

Thank you so much. This made my day.

jaide17:02:17

You’re welcome! The project could use some help. If you have implementation suggestions or bug fixes in mind please create issues and pull requests. Otherwise, more documentation, especially on writing custom tasks, would be very appreciated 🙂

mariuene18:02:05

Yes. I would be very happy to, I'll try to add something this weekend. :)