This is a sample for a very simple implementation using the OpenIntegration of paperlesspaper.
This project renders a minimal daily XKCD view that can be used in the paperlesspaper project.
Inside the app select New Image > Custom Integration and enter the url:
https://openintegration-dailyxkcd-gamma.vercel.app/config.json
- render.html: Static rendering template used for the display.
- api/xkcd.js: Serverless endpoint that fetches XKCD data and returns it in a lightweight format.
- config.json: Simple runtime configuration used by the Open Integrations.
- vercel.json: Vercel routing and build configuration.
The api/xkcd.js endpoint requests the latest XKCD JSON feed, extracts the minimal fields needed for the display, and returns them for consumption by the render.html
Install the Vercel CLI once, then start the local dev server:
npm i -g vercelvercel dev
The app will be available at http://localhost:3000. Use /config.json as the integration URL while developing and /render.html to see the preview.
Deploy to Vercel and ensure the api directory is recognized as serverless functions. The static rendering uses render.html and does not require a build step.
These kinds of simple plugins can be generated by using the AI of your choice and INSTRUCTIONS.md for reference.
XKCD content is © Randall Munroe. See https://xkcd.com/ and https://xkcd.com/license.html for usage details.