relate-app / gatsby-source-strapi-graphql

A Gatsby source plugin for building websites using Strapi as a data source
BSD Zero Clause License
32 stars 9 forks source link

Adding markdown remark to node #26

Closed ptimson closed 2 years ago

ptimson commented 2 years ago

Hey thanks for your lib,

I couldn't get the strapi/gatsby-source-strapi to work properly because of optional nodes where as this lib just worked for me!

However I needed to extract both the images and get the markdown to process with remark.

I looked at what was done in strapi/gatsby-source-strapi and hacked this together.

If you think it would help we can clean-up as currently using the inlineImages.typesToParse

timbrandin commented 2 years ago

Would this change make embedding images in markdown easier? Right now one have to find and replace in the rendering component one self. Or what it the reason for using remark otherwise?

ptimson commented 2 years ago

Hey @timbrandin I was a bit of an idiot I didn't realise/test that using react-markdown with gatsby would bundle the html into the build. I thought you had to do it at the source level for performance (I thought the react-markdown would be running at runtime). Therefore it doesn't make sense to do this. So closing :)