Worked on something pretty cool for shorterloop.com - a pipeline that lets our 𝘤𝘰𝘯𝘵𝘦𝘯𝘵 𝘵𝘦𝘢𝘮 𝘸𝘳𝘪𝘵𝘦 𝘪𝘯 𝘕𝘰𝘵𝘪𝘰𝘯 while the website stays blazing fast.
𝗧𝗵𝗲 𝗽𝗿𝗼𝗯𝗹𝗲𝗺 𝘄𝗮𝘀 𝗰𝗹𝗮𝘀𝘀𝗶𝗰: content folks love Notion's collaborative editing, but our site needed to be static for performance. Manual exports were a nightmare.
𝗦𝗼 𝗜 𝗯𝘂𝗶𝗹𝘁 𝗮 𝘀𝘆𝗻𝗰 𝘀𝘆𝘀𝘁𝗲𝗺 𝘁𝗵𝗮𝘁 𝗱𝗼𝗲𝘀 𝘁𝗵𝗲 𝗵𝗲𝗮𝘃𝘆 𝗹𝗶𝗳𝘁𝗶𝗻𝗴:
The Node.js script hits Notion's API, grabs published pages, then uses Puppeteer to scrape the actual rendered content (because Notion's API doesn't give you the full formatting). Images get optimized with Sharp and uploaded to Cloudflare R2. Everything gets packaged into a data.json that Eleventy(or 11ty) consumes.
The Eleventy config handles the fancy stuff - auto-generating glossaries, table of contents, lazy loading images, injecting proper meta tags. It even does smart text replacements and adds CSS classes on the fly.
Best part? It only processes pages that changed recently, so builds are fast.
The whole thing runs on GitHub Actions too - push to main and it automatically builds and deploys to Firebase. 𝗭𝗲𝗿𝗼 𝗺𝗮𝗻𝘂𝗮𝗹 𝗱𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 𝘀𝘁𝗲𝗽𝘀.
Now our content team writes in Notion like they always wanted, the site gets perfect 𝗟𝗶𝗴𝗵𝘁𝗵𝗼𝘂𝘀𝗲 𝘀𝗰𝗼𝗿𝗲𝘀, and I don't have to manually deploy content updates anymore. Plus we ditched our Webflow subscription and saved a bunch on monthly costs.
Sometimes the best solution is just connecting the tools people already love.