Show HN: A GitHub business card generator
github-business-card.vercel.app[1] https://vercel.com/docs/concepts/functions/edge-functions/og...
[1] https://vercel.com/docs/concepts/functions/edge-functions/og...
I quite like `dom-to-image-more` (sorta active fork of `dom-to-image`) that renders a SVG with a foreignElement that is a data URL of an XHTML page to a canvas. It also led me to rewriting my own image rendering stuff to just build an SVG in DOM, use toDataURL on it, and then render that in a canvas. So much simpler
[1]: https://github.com/metabolize/react-flexbox-svg
Edit: for a React-less implementation, see https://blog.scottlogic.com/2015/02/02/svg-layout-flexbox.ht...
Edit: This was updated, it used to point to his real Github username. Not that there's anything wrong with that! It's clever marketing.
But then again, people now have spam following/followers on Github so it indeed is stupid. A better way to showcase influence would be via the most starred repo perhaps?
I’m planning on adding a few customization options to the generation. I may add the QR code as one :)
...but it's easy enough to find on https://www.jsdelivr.com/package/npm/@vercel/og
It looks to be a tiny bit of glue code (minified but with source maps that I didn't examine), 2 wasm bundles which are probably open source, and an open source font.
Clever but I happen to be looking for documented open source stuff that does this. I guess knowing the names of yoga (which is a library from Facebook I already heard about) and resvg (which I probably already heard about) is a good starting point! https://github.com/facebook/yoga https://github.com/yisibl/resvg-js
Edit: fonts are here https://github.com/yisibl/resvg-js/search?q=font and the yoga part seems to be here https://news.ycombinator.com/item?id=33156130 It's pretty neat but I think most of this can be had without using facebook stuff :) https://time.com/6217730/myanmar-meta-rohingya-facebook/
(Does he have a GitHub?)
Suggestion: vcard data in qr code
It would be neat to see you do a Twitter version!
Maybe only use the first link. Or wrap a little bit to allow for multiple lines.