JSON Hero is an open-source, beautiful JSON explorer for the web that lets you browse, search and navigate your JSON files at speed. π. Built with π by the Trigger.dev team.
PR to switch from Peekalink to OpenGraph Ninja. Switching to the OpenGraph Ninja API was fairly straightforward, but there are a few differences that should be called out:
OpenGraph provides alt tag information, so I added that to the PreviewHtml component
OpenGraph doesn't provide an icon image in the response, but it does return a website's favicon image. I switched the icon image to point to this instead
OpenGraph doesn't provide additional information for Twitter or Youtube (e.g. likeCount). Without this data available, it didn't seem to make sense to keep the PreviewProperties logic in the PreviewHtml component, so I removed it.
It does look like in some cases at least, OpenGraph is doing better than Peekalink. I tried to preview an API Hero blog post in the currently deployed version of the app and it couldn't generate a preview: https://jsonhero.io/j/zGYmkaZxqyyf.
In my local version of the app which is using OpenGraph, it does seem to load the preview correctly:
I think whether or not we want to move forward with this change depends on how important point 3 is above. Given that OpenGraph is free, this tradeoff might be acceptable, but ultimately the maintainers of JSON Hero will need to decide.
This looks great! Regarding point 3 above, it's fine if we lose the PreviewProperties since OpenGraph doesn't support it. I'll review this PR shortly and leave any comments in the review π
PR to switch from Peekalink to OpenGraph Ninja. Switching to the OpenGraph Ninja API was fairly straightforward, but there are a few differences that should be called out:
alt
tag information, so I added that to thePreviewHtml
componentfavicon
image. I switched theicon
image to point to this insteadlikeCount
). Without this data available, it didn't seem to make sense to keep thePreviewProperties
logic in thePreviewHtml
component, so I removed it.It does look like in some cases at least, OpenGraph is doing better than Peekalink. I tried to preview an API Hero blog post in the currently deployed version of the app and it couldn't generate a preview: https://jsonhero.io/j/zGYmkaZxqyyf.
In my local version of the app which is using OpenGraph, it does seem to load the preview correctly:
I think whether or not we want to move forward with this change depends on how important point 3 is above. Given that OpenGraph is free, this tradeoff might be acceptable, but ultimately the maintainers of JSON Hero will need to decide.
Bounty: /claim #10