ipfs / ipfs-website

Official IPFS Project website
https://ipfs.tech
MIT License
32 stars 16 forks source link

Twitter Cards #228

Closed tbenbow closed 1 year ago

tbenbow commented 1 year ago

Heya Chris, I think this is ready to merge but I'm not fetching the Twitter profile images from Twitter. I think we need an API key for that and I'm not sure if they are free anymore. I think we'll want to keep the images I have in here as fallbacks regardless. Maybe we can put that in another PR?

The cards aren't lining up nicely at the bottom like in the layout either. I notice that they have some extra space after posts to pull that off. Not sure how manageable that would be for editors, maybe it's worth it?

fixes: #198

cwaring commented 1 year ago

Adding a new markdown dependency to our components means we end up shipping the whole library to the client, in most cases we'll never need to use this for dynamic rendering, so we can opt-in to the new (experimental) componentIslands feature to render this component on the server only. Considering we have a dependency for nuxt/content I've also update the component to lean on their included renderer to save on adding an additional one to our app.

Overall this reduces the initial payload by ~500kb, which is a great win with little compromise. We can do a deeper optimization at a later stage too.

2023-05-08 @ 10 35 05@2x

2023-05-08 @ 10 46 07@2x