perun

Discuss perun static site generator
martinklepsch 2017-02-26T14:21:53.000597Z

@bhagany 👋 hey

martinklepsch 2017-02-26T14:23:50.000598Z

I got my contentful task working nicely but now would like to add generated items to the atom feed — they don’t appear though. If I understand correctly this is because they’re never really added to the perun metadata that is threaded through the call chain.

martinklepsch 2017-02-26T14:46:12.000599Z

Any does that mean the approach of using just render-task fails at that point and I should make a task that properly modifies metadata

bhagany 2017-02-26T15:35:42.000600Z

@martinklepsch they actually are added to the perun metadata automatically, as long as the files are there. If atom-feed is after your contentful task, and it has a filterer that should get the contentful files, it ought to work

bhagany 2017-02-26T15:36:24.000601Z

I'd be happy to take a look, if the code is public?

bhagany 2017-02-26T15:39:18.000602Z

Ah, that's probably it. :include-atom is not set on your contentful files. You should be able to add it in your paths-fn that you pass to render-task

bhagany 2017-02-26T15:39:46.000603Z

Or put a different filterer on atom-feed

martinklepsch 2017-02-26T19:01:24.000605Z

FYI I deployed the current master as snapshot to clojars

martinklepsch 2017-02-26T19:01:39.000606Z

ugh, somehow slack got stuck and I just got this now

martinklepsch 2017-02-26T19:02:37.000607Z

@bhagany I replaced the filterer and printed each to-be-filtered item, the contentful pages didn’t show up

bhagany 2017-02-26T19:03:21.000608Z

do they show up with print-meta?

bhagany 2017-02-26T19:03:32.000609Z

after the contentful task

martinklepsch 2017-02-26T19:05:28.000610Z

Let me check

martinklepsch 2017-02-26T19:05:45.000611Z

they do!

bhagany 2017-02-26T19:06:11.000612Z

huh, then I'm not sure why they wouldn't be included in your filterer...

bhagany 2017-02-26T19:06:21.000613Z

unless the extension is different, maybe?

martinklepsch 2017-02-26T19:06:30.000614Z

They don’t have an extension

martinklepsch 2017-02-26T19:06:38.000615Z

could that be the issue?

martinklepsch 2017-02-26T19:06:48.000616Z

I’m doing slightly funky things I guess

bhagany 2017-02-26T19:06:49.000617Z

ah, that's probably it, then. there's an extensions parameter to atom-feed

bhagany 2017-02-26T19:07:19.000618Z

I'm not sure I considered this case of no extension... maybe an empty string will work?

bhagany 2017-02-26T19:08:20.000619Z

setting extensions to an empty vector would also work, but that means it won't exclude any files, including your source files

bhagany 2017-02-26T19:08:31.000620Z

so your filterer would have to make sure to exclude all of that

martinklepsch 2017-02-26T19:10:34.000621Z

trying that, 1s

martinklepsch 2017-02-26T19:11:08.000622Z

ok, now it’s trying to render the items

martinklepsch 2017-02-26T19:11:36.000623Z

nice ok

martinklepsch 2017-02-26T19:11:48.000624Z

code is public btw: https://github.com/martinklepsch/one-of-each

bhagany 2017-02-26T19:11:55.000626Z

ah, nice

martinklepsch 2017-02-26T19:12:41.000627Z

got a pretty sweet setup: confetti for initial setup, contentful to manage content, webhooks to trigger new deploys, circleCI to execute them

bhagany 2017-02-26T19:13:01.000628Z

that sounds really slick 😄

martinklepsch 2017-02-26T19:13:14.000629Z

Site is at https://one-of-each.xyz/

bhagany 2017-02-26T19:16:31.000631Z

wow, that contentful task is even less code than I thought it would be

bhagany 2017-02-26T19:16:39.000632Z

(including the paths-fn)

martinklepsch 2017-02-26T19:17:00.000633Z

yeah was super straightforward once you showed me the individual lego pieces 👍

martinklepsch 2017-02-26T19:17:41.000635Z

An interesting/weird part is: I’m using perun to generate “shell pages” with no content that just contain opengraph/twitter meta tags. Rest is done by cljs app.

bhagany 2017-02-26T19:18:18.000636Z

I was just noticing that, very interesting indeed

martinklepsch 2017-02-26T19:21:05.000637Z

Now I’ll pubslish something new via contentful, lets see how that goes

bhagany 2017-02-26T19:21:16.000638Z

will that auto-deploy?

martinklepsch 2017-02-26T19:21:46.000639Z

I hope so 😆

bhagany 2017-02-26T19:21:51.000640Z

nice

martinklepsch 2017-02-26T19:22:36.000641Z

Contentful had really nice docs to setup the webhook etc which really made it a 5min thing: https://www.contentful.com/developers/docs/ruby/tutorials/automated-rebuild-and-deploy-with-circleci-and-webhooks/

juhoteperi 2017-02-26T19:25:27.000643Z

interesting. I'd try Contentful for company blog if it weren't for the quite steep per user pricing.

martinklepsch 2017-02-26T19:26:00.000644Z

worked! https://one-of-each.xyz/t/wuppertal-grandbrothers-3Cv2iZciGcqmG84qecYm6O

martinklepsch 2017-02-26T19:26:37.000647Z

@juhoteperi there’s also http://prismic.io which is a bit lower priced

martinklepsch 2017-02-26T19:27:46.000648Z

I couldn’t dig up there HTTP api reference though and thus just went with contentful

martinklepsch 2017-02-26T19:29:54.000649Z

they have some sort of api explorer that they sent me after I decided to use contentful http://one-of-each.prismic.io/api (not sure if you can open that) @juhoteperi

martinklepsch 2017-02-26T19:30:29.000650Z

Now I just gotta fix the ordering of posts and then I can sleep 😄

juhoteperi 2017-02-26T19:30:54.000651Z

It does work

bhagany 2017-02-26T19:33:34.000652Z

woo! congrats @martinklepsch

martinklepsch 2017-02-26T19:42:00.000654Z

Alright, sleep time 💤 👋