Fork me on GitHub
#perun
<
2017-02-26
>
martinklepsch14:02:50

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.

martinklepsch14:02:12

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

bhagany15:02:42

@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

bhagany15:02:24

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

bhagany15:02:18

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

bhagany15:02:46

Or put a different filterer on atom-feed

martinklepsch19:02:24

FYI I deployed the current master as snapshot to clojars

martinklepsch19:02:39

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

martinklepsch19:02:37

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

bhagany19:02:21

do they show up with print-meta?

bhagany19:02:32

after the contentful task

bhagany19:02:11

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

bhagany19:02:21

unless the extension is different, maybe?

martinklepsch19:02:30

They don’t have an extension

martinklepsch19:02:38

could that be the issue?

martinklepsch19:02:48

I’m doing slightly funky things I guess

bhagany19:02:49

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

bhagany19:02:19

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

bhagany19:02:20

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

bhagany19:02:31

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

martinklepsch19:02:34

trying that, 1s

martinklepsch19:02:08

ok, now it’s trying to render the items

martinklepsch19:02:41

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

bhagany19:02:01

that sounds really slick 😄

bhagany19:02:31

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

bhagany19:02:39

(including the paths-fn)

martinklepsch19:02:00

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

martinklepsch19:02:41

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.

bhagany19:02:18

I was just noticing that, very interesting indeed

martinklepsch19:02:05

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

bhagany19:02:16

will that auto-deploy?

martinklepsch19:02:46

I hope so 😆

martinklepsch19:02:36

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/

juhoteperi19:02:27

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

martinklepsch19:02:37

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

martinklepsch19:02:46

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

martinklepsch19:02:54

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

martinklepsch19:02:29

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

juhoteperi19:02:54

It does work

martinklepsch19:02:00

Alright, sleep time 💤 👋