TryGhost / docs

Ghost's official documentation
https://docs.ghost.org
MIT License
112 stars 79 forks source link

Switch to use Ghost-SDK tags helper #51

Closed ErisDS closed 5 years ago

ErisDS commented 5 years ago

~~only works when using yarn link 🤔 ~~

The original version of this PR used a react helper from @tryghost/helpers-react, but I'm not sure that concept is going to be worthwhile. If we want to have react components for gatsby they need to use gatsby-link, whereas a normal react helper would use react-router-dom's link.

I'm not sure there's an easy way to make a generic component, or if we really ought to have helpers-gatsby rather than helpers-react cc @JohnONolan

For now, I've moved my attempt at a react component into this repo in place of the existing tags component, which uses the ghost tags helper to do filtering, limiting and so on.

I think it works.

netlify[bot] commented 5 years ago

Deploy preview for tryghost ready!

Built with commit b84cda8559a06de5801e908d48b00c88cafd40d6

https://deploy-preview-51--tryghost.netlify.com

ErisDS commented 5 years ago

@AileenCGN I've updated this PR

@JohnONolan I don't think having generic react components is gonna work without quite a bit more playing (see PR desc). I think I will focus on having a more thorough suite of tools in @tryghost/helpers, and we can think about use cases for either @tryghost/helpers-react or @tryghost/helpers-gatsby when we get a bit further down the road.