perun 2017-02-19

I think something is wrong with that line. Causes the fileset to end up being a boolean: https://github.com/hashobject/perun/commit/392f4595c1efa0c13c90dcb38199cda541944032#diff-fcdbdc33f243f02eeb45eac4540c6427R291

Cool! I now have a static perun site rendered with Rum/Enlive and a Rum app that picks up on the client

1

of course you're right @martinklepsch. I don't know what I was thinking. Fixing shortly.

@martinklepsch @bhagany big +1 on integrating some http://contentful.com into perun. Have been thinking of this for a while - but haven’t come back around to it. Have used contentful extensively — it’s a great service.

thanks for the feedback

It was pretty easy with the pointers @bhagany provided

@donmullen no, mostly lurking and thinking about applications (occasionally)

fascinated by the possibilities of dapps / ethereum / blockchain tech

I think I also am but also haven’t seen anything that had broader consumer adoption

re contentful, json files et al. — it’s kind of what I had in mind with the last guide here: https://perun.io/guides/

ah, yes. thanks for connecting those dots - I only had a vague idea about it

@martinklepsch I'm interested in your static Rum/Enlive site. Is it live, or is the code public?

hrm, I think something is going on with Runnable. I've been having tests time out or run out of memory (for a branch that changed very little) this morning. Now I just noticed that tests are being re-run for PR's that I haven't touched since yesterday. I haven't noticed this behavior before, is it normal, @podviaznikov?

well, I managed to turn all the PR branches green on Runnable, though I think I broke the integration with github on #168, and I'm not sure how

@bhagany thanks for the pointer regarding task order, that fixes it 🙂

One thing I’m about to try is rendering http://contentful.com data with Perun. @bhagany what do you regard as the best way to generate a bunch of files that don’t originate from individual other files? E.g. I’ll download a JSON blob and want to turn that into X html files.

@martinklepsch ooo! I've been waiting for a use-case like this

so, you'd like to do something like, make an API call, and render multiple pages based on the results?

yep, pretty much

okay, is it a defined set of pages?

the number of pages is defined by the result of the API call (and thus may change) if that’s the question

yes, that's what I was trying to say

One way to do it would be to create “fake”/empty files in the fileset with the respective metadata I think

Just wondering if there might be a better way

yes, I think there is

you could write a task that looks like this:

(deftask contentful
  [r renderer RENDERER sym "page renderer (fully qualified symbol which resolves to a function)"]
  (render-task {:task-name "contentful"
                :paths-fn contentful-paths
                :renderer renderer
                :tracer :your.ns/contentful}))

(I gotta move, will be back in 20min)

contentful-paths takes the fileset as an argument (which you can ignore), then you'd do your API call, and return a map shaped like {"path/to/render" render-args}

oh, and render-task is io.perun/render-task

heh, also, this is assuming you're running on Perun master. If you're on the most recent snapshot, then it's render-pre-wrap instead of render-task (this just changed today)

I wasn't familiar with http://contentful.com before this, but it seems like it might be a decent candidate for official support in Perun, if there's interest. I'm not sure where the line on that kind of thing should be, though.

bhagany: I think that having contentful task in either perun itself or as separate library are both good option. Maybe standalone library is better because there are a lot of services like contentful - https://headlesscms.org/. E.x. some time ago http://prismic.io was mentioned.

Okay, that makes sense to me

That looks like a nice solution!

Will try in a bit