{
"$type": "site.standard.document",
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreickaur4fpa2do26y75ok4rodtayq2eo743j524twvylyxn4phrlmq"
},
"mimeType": "image/png",
"size": 397048
},
"description": "We migrated this blog to Val Town Projects",
"path": "/migration",
"publishedAt": "2025-04-08T00:00:00.000Z",
"site": "at://did:plc:a2rdzfdxkjwerrfrpbwcipb2/site.standard.publication/3jd443afc2222",
"textContent": "We migrated our blog to Val Town 🥳\n\nWith some cleverness, we were able to build it and migrate 65 old blog posts in\none day. Now our deployments happen instantly (~100ms), and we've greatly\nsimplified our blogging stack.\n\n| | Before | Now |\n| ------------------- | ------------------------- | ---------- |\n| Rendering | Astro | React |\n| Version control | GitHub | Val Town |\n| Text editing | Local editor | Val Town |\n| Deployment | Cloudflare Pages + GitHub | Val Town |\n| Hosting | Cloudflare Pages | Val Town |\n| CDN | Cloudflare | Cloudflare |\n\nShould you blog on Val Town?\n\nMaybe! It depends on your constraints and what matters to you. We care deeply\nabout:\n\n1. Tight feedback loops\n2. Simple, browser-based workflows\n3. A fast migration\n\nWe also care deeply about dogfooding, but unless you're us – and unfortunately\nmost of you aren't – that one doesn't apply to you.\n\nThere are also good reasons not to migrate to Val Town, but we'll get to them\nlater.\n\nTight feedback loops\n\nWe at Val Town are obsessed with tight feedback loops.\n\n> \"Creators need an immediate connection to what they're creating.\"\n>\n> – Bret Victor, \"Inventing on Principle\"\n\nIn some ways, this singular commitment to tight feedback loops is what separates\nVal Town from all other code hosting & deployment platforms. We believe that you\nshould be able to iterate directly in your production environment, not iterate\nlocally, then deploy, then wait minutes to see how things look live.\n\n<p style=\"position: relative; aspect-ratio: 16/9; border: 1.5px solid grey; border-radius: 10px; overflow: hidden;\">\n <iframe\n src=\"https://player.mux.com/wYfiMf8NFzczOfdviMltPPer3CA6FrO3drvHnBSpdBQ?autoplay=muted&loop=true&preload=metadata\"\n style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;\"\n allow=\"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture\"\n allowfullscreen=\"true\"\n ></iframe>\n</p>\n\nIn Val Town, a save is a deploy, and it happens in about 100ms. We go to great\ntechnical lengths to make this possible. This means no waiting minutes to see\nwhat your post looks like live. You get the fast local dev experience, but with\nproduction. And this goes for branches too. Every edit of every branch is\ninstantly deployed in a shareable URL.\n\nSimple, browser-based workflow\n\nVal Town lets you use fewer tools. It replaces:\n\n- your local text editor,\n- git + GitHub for version control\n- whatever you use for deployment and hosting, Cloudflare, Vercel, Render,\n Railway, Heroku, Digital Ocean, Hertzner, etc\n\nSimpler, browser-based workflows are particularly important for casual\ncontributors, such as less technical folks on your team or strangers on the\ninternet. Val Town is a single website for code to be edited, versioned,\ncollaborated on, and deployed. No need for anyone to install or use git, clone\nthe repo locally, install programming languages and dependencies, or use a local\ntext editor.\n\nFor example, here's how to make a change to this blog that you're reading right\nnow:\n\n<p style=\"position: relative; aspect-ratio: 16/9; border: 1.5px solid grey; border-radius: 10px; overflow: hidden;\">\n <iframe\n src=\"https://player.mux.com/8n5KlbJOlPKqLpQ02HDaNmVBGuRnDzLj1CXsahaZE96o?poster=\"\"\n style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;\"\n allow=\"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture\"\n allowfullscreen=\"true\"\n ></iframe>\n</p>\n\nVal Town is uniquely positioned to allow anyone see their changes deployed live\nin their remix, because we host both your source code and your deployments.\n\nA fast migration\n\nHow did we migrate 65 blog posts – with images, videos, and intricate formatting\nand styles – to an entirely new blog in a single day?\n\nWe didn't. We left them where they are, and proxy to them.\n\nWriting a proxy in Val Town (or any functions platform with the\n'fetch handler' interface)\nis a delight:\n\n\n\nSo if you go to view\nblog.val.town/blog/val-town-newsletter-24\nyou'll see exactly what you would at\nval-town-blog.pages.dev/blog/val-town-newsletter-24.\nI find it eerie that proxies work so well.\n\nWe've had reasonable success with this technique of migrating to Val Town\nquickly by proxying most old content, and only rebuilding the homepage and new\nposts. I first used this technique on my personal website,\nstevekrouse.com, and was pleased to see it continue\nto work here.\n\nGood reasons not to blog on Val Town\n\n1. Val Town Projects are beta software, so you'd be on the cutting-edge\n alongside us. We're coming up with patterns that you'd get for free from\n mature blogging tools like Astro and Cloudflare Pages.\n2. Val Town doesn't have good workflows for bundlers or build steps, so it's\n hard to use anything that requires vite, etc.\n3. Val Town doesn't (yet) have pull request comments.\n\nPersonally, I value simplicity, so I don't mind building a basic blog from\nscratch without a bundler with some help from AI. I do miss pull requests\ncomments though. We plan on building them soon.\n\nBad reasons not to blog on Val Town\n\n1. Lock-in. Val Town is built on Deno and web standards, so you can easily\n leave for another deployment platform like Cloudflare, Vercel, or Deno\n Deploy. We'll even help you migrate. We believe in the open web.\n\n2. Price. We have a generous free tier, so your blog can go viral on HN, get\n 100k hits in a day, and you pay $0. It's $10 / month for 1m code runs per\n day. Need additional scale beyond that? It's still $10 / month while our\n Scale Plan is in beta. When ready, our scale pricing will be in line with\n other FaaS providers.\n\nGet yourself a Val Town blog\n\nIf you are starting a new blog from scratch, remix\nthis markdown blog starter.\n\nIf you are migrating an existing blog, feel free to remix\nthe Val Town blog. It comes with good\npatterns for proxying to old content.",
"title": "The Val Town Blog is now hosted on Val Town"
}