perun

Discuss perun static site generator
martinklepsch 2017-02-27T07:08:19.000655Z

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?

martinklepsch 2017-02-27T09:28:50.000656Z

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

bhagany 2017-02-27T13:45:59.000658Z

@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.

bhagany 2017-02-27T13:47:37.000659Z

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.

bhagany 2017-02-27T13:52:39.000660Z

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.

podviaznikov 2017-02-27T23:24:00.000661Z

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