Fork me on GitHub
#perun
<
2017-02-27
>
martinklepsch07:02:19

So with the atom UUID thing I thought I could refer to data I created in my contentful-paths function but it seems only the result of the render function is added back to the real entry:

{:path "t/opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :slug "opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :content “....", :permalink "/t/opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :full-path "/Users/martin/etc/boot/cache/tmp/Users/martin/projects/one-of-each/1ila/u2qisy/t/opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :parent-path "t/", :short-filename "opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :extension "opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :filename "opening-superpoze-2BoKegM6fSy2cOUIQAkmYC", :io.perun/trace [:ofe.contentful/contentful]}
Are there any built-in tools to add entries to the metadata?

martinklepsch09:02:50

Running out of ideas… https://github.com/martinklepsch/one-of-each/tree/atom @bhagany if you have any suggestions let me know!

bhagany13:02:59

@martinklepsch Yes, to modify metadata of the paths, you'd have to use content-task instead of render-task. In this case, the return value from your rendering function needs to be map of metadata to set, plus a :rendered key that contains your rendered content.

bhagany13:02:37

There are a few other details that are different, because content-task is lower level than render-task, but I think it is relatively straightforward. If you have more questions about it, I'm happy to answer, but right now I have to take my kids to school. I'll be back later, so feel free to post any questions in the meantime.

bhagany13:02:39

Also, I should apologize, my memory on this was faulty yesterday, when I said something about doing this in your paths-fn. That way could work too, but you'd still need to use content-task.

podviaznikov23:02:00

@martinklepsch good job with http://one-of-each.xyz. what is the idea behind it?