contentful / contentful-metalsmith

A plugin for Metalsmith that pulls content from the Contentful API
87 stars 32 forks source link

I'm not sure what is causing the error. #51

Open lassiter opened 7 years ago

lassiter commented 7 years ago

I updated my content type to be 'blogPost' and am now getting split errors when I run 'npm start' in terminal.

You can see the latest version here: https://github.com/lassiter/portfolio-wip/tree/metalsmith-rework and the debug log: https://github.com/lassiter/portfolio-wip/blob/metalsmith-rework/npm-debug.log.

You can see my terminal entry here: https://slack-files.com/T0ANJK399-F4P08H1QA-ac0fbd69ba

Khaledgarbaya commented 7 years ago

Hi @lassiter, I can see the content_type is different here, shouldn't be blogPost ? the crash is not happening in the plugin btw. the shorten function crashes becuase there is no content.

axe312ger commented 7 years ago

That one should help you :) https://github.com/lassiter/portfolio-wip/pull/1

axe312ger commented 7 years ago

I fixed the example in the readme -> https://github.com/contentful/contentful-metalsmith/commit/95db056312e8bd11a63375255a68c53575f88fca

lassiter commented 7 years ago

@Khaledgarbaya I don't quite understand. So, far I've never been successful getting it to integrate with my space regardless the content type being blogPost or the content type via the hash code (or whatever you call that which you referenced). Getting it up and running with node.js has been the biggest wall that I've yet to surmount.