From f4432dbed9258e096f0004b08b282f739a01a427 Mon Sep 17 00:00:00 2001 From: Curtis Parfitt-Ford Date: Sat, 28 Oct 2023 18:45:40 +0100 Subject: [PATCH] Fix CloudFlare link --- posts/2023/10/27/how-to-build-a-blog-the-hard-way.svx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2023/10/27/how-to-build-a-blog-the-hard-way.svx b/posts/2023/10/27/how-to-build-a-blog-the-hard-way.svx index 87c7862..ac1ec52 100644 --- a/posts/2023/10/27/how-to-build-a-blog-the-hard-way.svx +++ b/posts/2023/10/27/how-to-build-a-blog-the-hard-way.svx @@ -57,7 +57,7 @@ I have a reMarkable 2 e-ink tablet: I find it super handy for notetaking, and I Typed documents on the reMarkable can be exported either as a PDF, a PNG, an SVG, or as text in an email: the SVG option exports the text as paths, so it looks like the reality pretty strongly favoured doing some parsing of the text in the email. Fortunately, it's sent as HTML, and HTML that's produced in a pretty regular format. So, that should be pretty easy to parse in, right? -Unfortunately, the challenge here was Workers' lack of support for DOM parsing. The Workers runtime is built around the idea of rewariting origin responses in real time, and for very valid technical reasons that [Cloudflare discuss in detail in a blog post connected to their HTMLRewriter API](https://blog.cloudflare,com/introducing-htmlrewriter), doing full DOM parsing in that process is all but impossible. This does, though, mean that in contexts like this one, where really that's what would make most sense, that processing has to be offloaded elsewhere. Other projects like [losfair's notion-fetch](https://github.com/losfair/notion-fetch) implemented this by building their DOM parser in another language, compiling to WebAssembly and then running that: for me, though, that seemed like a lot of overhead for this specific application, and I just shoved that unit of work into the GitHub Action that the Worker calls. +Unfortunately, the challenge here was Workers' lack of support for DOM parsing. The Workers runtime is built around the idea of rewariting origin responses in real time, and for very valid technical reasons that [Cloudflare discuss in detail in a blog post connected to their HTMLRewriter API](https://blog.cloudflare.com/introducing-htmlrewriter), doing full DOM parsing in that process is all but impossible. This does, though, mean that in contexts like this one, where really that's what would make most sense, that processing has to be offloaded elsewhere. Other projects like [losfair's notion-fetch](https://github.com/losfair/notion-fetch) implemented this by building their DOM parser in another language, compiling to WebAssembly and then running that: for me, though, that seemed like a lot of overhead for this specific application, and I just shoved that unit of work into the GitHub Action that the Worker calls. ## The end result