hackerweb
hackerweb copied to clipboard
[Work in Progress] Add Open Graph metadata tags to HackerWeb
Had a little hack this morning to try and add Open Graph tags to HackerWeb so that you would get rich previews when sharing hackerweb links with others (I often like to share the HW link rather than the original because HW is just such a cleaner experience to follow the comments!)
More on Open Graph: http://ogp.me/
Some guidance on integration: https://medium.com/@richardoosterhof/how-to-optimize-your-site-for-rich-previews-527ed13a6d69
This definitely isn't working correctly yet, but the gist is here. Not clear if I'll have time to finish refining this so instead of letting it bit rot I figured I'd at least show you what I have and see what you think.
Few thoughts:
- Do you get any kind of image URL from the HN API? If not we could just use a standard HW app image, or none at all.
- Likewise do you get a description from the API? I roughly propose here a generic statement, so that with the title a user seeing a rich link sees something like 'Find out what Hacker News thinks of this with HackerWeb.'
Any thoughts appreciated! And great work on HW BTW, use it every day and love it.