title: | The Val Town Blog is now hosted on Val Town |
---|---|
description: | We migrated this blog to Val Town Projects |
pubDate: | 2025-04-07T00:00:00.000Z |
author: | Steve Krouse |
We migrated our blog to Val Town 🥳
With some cleverness, we completed this migration of over 60 old blog posts in about one day. Now our deployments happen instantly (~100ms), and we've greatly simplified our blogging stack.
Before | Now | |
---|---|---|
Rendering | Astro | React |
Version control | GitHub | Val Town |
Text editing | local editor | Val Town |
Deployment | Cloudflare Pages + GitHub | Val Town |
Hosting | Cloudflare Pages | Val Town |
CDN | Cloudflare | Cloudflare |
Maybe! It depends on your constraints and what matters to you. We care deeply about:
- Tight feedback loops
- Simple, browser-based workflows
- A fast migration
We also care deeply about dogfooding, but unless you're us – and unfortunately most of you aren't – that one doesn't apply to you.
- Val Town Projects are beta software, so you'd be on the cutting-edge alongside us. We're coming up with patterns that you'd get for free from mature blogging tools like Astro and Cloudflare Pages.
- Val Town doesn't have good workflows for bundlers or build steps, so it's hard to use anything that requires vite, etc.
- Val Town doesn't (yet) have pull request comments.
Personally, I value simplicity, so I don't mind building my own basic blog from scratch without a bundler. I do miss pull requests comments though. We plan on building them soon.
-
Lock-in. Val Town is built on web standards, so you can easily leave for another deployment platform like Cloudflare, Vercel, or Deno Deploy. We'll even help you migrate. We believe in the open web.
-
Price. We have a generous free tier, so your blog can go viral on HN, get 100k hits in a day, and you pay $0. Need additional scale beyond that? It's still free! At least for the next couple months while our Scale Plan is in beta. When ready, our pricing will be in line with other FaaS providers.
Ok, now that we got that out of the way, here's why you might want to blog on Val Town...
We at Val Town are obsessed with tight feedback loops.
"Creators need an immediate connection to what they're creating."
– Bret Victor, "Inventing on Principle"
In some ways, this singular comittment to tight feedback loops is what separates Val Town from all other code hosting & deployment platforms. We believe that you should be able to iterate directly in your production environment, not iterate locally, then deploy, then wait minutes to see how things look live.
In Val Town, a save is a deploy, and it happens in about 100ms. We go to great technical lengths to make this possible. This means no waiting minutes to see what your post looks like live. You get the fast local dev experience, but with production. And this goes for branches too. Every edit of every branch is instantly deployed in a shareable URL.
Val Town lets you use fewer tools. It replaces:
- your local text editor,
- git + GitHub for version control
- whatever you use for deployment and hosting, Cloudflare, Vercel, Render, Railway, Heroku, Digital Ocean, Hertzner, etc
Simpler, browser-based workflows are particularly important for casual contributors, such as less technical folks on your team or strangers on the internet. Val Town is a single website for code to be edited, versioned, collaborated on, and deployed. No need for anyone to install or use git, clone the repo locally, install programming languages and dependencies, or use a local text editor.
For example, here's how to make a change to this blog that you're reading right now:
TODO Video
Ideal script, anonymous:
- Click "edit this page" on this blog
- Get taken to an editable view of this markdown (no signup, no remix)
- Make an edit, ie fix a typo
- Cmd+enter shows how it'd look live (run code in a temp remix, auto-shows index.ts's preview)
- AI-generated title & description that auto-updates as you make edits, in the 'create pull request' notice, that you can edit (speculative, could be in a form)
- Press 'create pull request' on that page (pr from an anonymous user)
Ideal script, authenticated:
- Click "edit this page" on this blog
- Get taken to an editable view of this markdown (without remix)
- Make an edit, ie fix a typo
- Cmd+enter shows how it'd look live (without remix, auto-shows index.ts's preview)
- Press 'create pull request' on that page (pr from an 'external branch')
Script with the tech we have:
- Click
view source
on this blog - Click
Remix
- Click
>
on posts - Click on this blog.md
- Click
Code
- Fix a typo
- Click home
- Click on the blog post
- See it fixed
- Click 'Compare branch'
- Scroll down
- Click Create Pull Request
- Type in PR title
- Click Create Pull Request
This is too many steps! Still better than Github? Yes by at least 2x for casual users given the complexity of local setup.
Things we can build to improve this:
- Pin Preview button in file ... menu so I can do it after making the change
- Pin button on home preview so I can do that before navigating to the file
- Collapse the uuid in the url on default to scroll-left always being prioritized so you can see the path (otherwise it's useless)
- Find another way to show the live changes, ie jackson's left-bottom corner preview hover widget idea
Val Town is unqiuely positioned to allow anyone see their changes deployed live in their remix, because we host both your source code and your deployments.
How did we migrate 65 blog posts – with images, videos, and intricate formatting and styles – to an entirely new blog in a single day?
We didn't. We left them where they are and proxy to them.
Writing a proxy in Val Town (or any functions platform with the 'fetch handler' interface) is always a delight:
const OLD_BLOG_HOST = "https://val-town-blog.pages.dev/";
export async function proxy(req: Request): Promise<Response> {
const url = new URL(req.url);
return fetch(OLD_BLOG_URL + url.pathname + url.search, {
method: req.method,
headers: req.headers,
});
}
So if you go to view blog.val.town/blog/val-town-newsletter-24 you'll see exactly what you would at val-town-blog.pages.dev/blog/val-town-newsletter-24. I find it eerie that proxies work so well.
We've had reasonable success with this technique of migrating to Val Town quickly by proxying most old content, and only rebuilding the homepage and new posts. I first used this technique on my personal website, stevekrouse.com, and was pleased to see it continue to work here.
If you are starting a new blog from scratch, remix this markdown blog starter.
If you are migrating an existing blog, feel free to remix this blog, because it comes with good patterns for proxying to old content.