Next month #Vercel invoice will be a disaster! Working on usage #optimisation. Still struggling with Data Cache Writes / Reads & Fast Origin Transfer. Not sure what happened here. #hosting #deployment #nextjs #middleware #edgefunctions
I don't blog much but I thought a post on how I now handle #SSR and #CSR theme switching was worth it. https://jamesbasoo.com/blog/theme-switching-ssr-csr/ #JavaScript #TypeScript #EdgeFunctions
SSR + CSR Theme Switching

The theme switcher was one of the first things I built for my site and it had an annoying flaw.

I finally fixed the un-themed flash on my site using #Netlify #EdgeFunctions and a theme cookie. I also added a basic fade view transition too, although it seems a bit hit and miss.

I do wonder whether there's a cleaner way of preventing the function running on non-HTML files though. At least locally it seemed to be running on every request.

```
export const config: Config = {
path: "/*",
excludedPath: [
"/*.css",
"/*.js",
"/*.svg",
...
]
}
```

With #Hono, I can make my own link shortener, a redirector in about 30 lines of code. Plus, it very lightweight and almost costs nothing.

See it in action: https://aka.mrwillcom.com

This is hosted on #Vercel's #EdgeFunctions, with visits tracking data stored in #Redis on #Upstash.

#javascript #serverless #linkshortener #opensource

My latest blog post, Creating an OG image using React and Netlify Edge Functions just dropped. Maybe you'll find it helpful.

https://dev.to/opensauced/creating-an-og-image-using-react-and-netlify-edge-functions-563a #reactjs #edgefunctions

Creating an OG image using React and Netlify Edge Functions

Open Graph (OG) images are a must if you're sharing content on the Internet. From sites like...

DEV Community

A Service is a modular piece of edge-enabled software that runs on (and utilizes the features of) Fleek Network.

In this guide, we will explain what services are, how they work, and walk through a few examples of how to use them in your tech stack

https://blog.fleek.network/post/fleek-network-developer-guide-services/

#fleek #fleekNetwork #ipfs #dweb #webDev #distributed #programming #developer #web #cdn #edgeFunctions #serverless #paas

Fleek Network Developer Guide Part 2: Services

Learn everything you need to know about the main developer-facing layer of Fleek Network - Services.

For anyone wishing to share their toots on their static site: edge functions are a great way to transform the content of a page at request time.

Here’s how you can use the public #mastodon api: https://khendrikse.netlify.app/blog/add-mastodon-toots-to-a-static-page-using-edge-functions/

#netlify #edgefunctions

Add mastodon toots to a static page using Edge Functions

Let's show a list of toots on your static page without having to add any JavaScript to it.