This light PWA uses the XKCD JSON version to query a comic strip's data via AWS lambda functions (comfily through Netlify functions).
It's more of a silly learning project to dip my toes in serverless and Go.
It also displays the title/alt text of an image so you wouldn't have to hover and wait for it.
You're welcome.
This app also tries to make the comics more accessible, exposing the transcript of each comic in an aria-label attribute (for screen-readers).
A collection of findings discovered along the way.
xkcd JSON "API"'s encoding seems to be buggy. For example, em
dash gets encoded as \u00e2\u0080\u0094
ref1 - xkcd forum; ref2 - SO meta
A workaround: decodeURIComponent(escape(transcript))
- Handle 404s both client-side (when our serverless returns a 404) and server-side (ie on weird routes or when the route structure doesn't match a digits-only regex / "about")
- Add either page transitions or UI skeletons
npm install
npm run serve
npm run build
npm run lint
npm run test:unit