Open JamieSlome opened 5 months ago
@danielroe - am I on the right track?
api/
crux/
run/
badge/
├─ [domain].get.ts
badge/[domain].get.ts
export default defineCachedEventHandler(async event => {
.
.
const image = ...
return image.toString()
})
Yep! But I think we can directly return an SVG string rather than a binary image.
Suggested improvements 🔨
As page-speed.dev serves as a performance and usability metric for websites, web developers and site owners should be able to transparently share their scores via an embeddable HTML element or Markdown badge.
Requirements 📏
Considerations 💭
This is fairly similar to the OpenGraph code and infrastructure in place; perhaps we could re-use to support the implementation of status badges and embeddable elements.