
Public
Like
original-vt-blog
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v25View latest version
The Val Town Blog migrated from Astro + Cloudflare Pages to being hosted directly on Val Town. This repository contains the code that powers the current blog implementation.
- New Posts: New blog posts are rendered directly from Val Town
- Legacy Posts: For older blog posts, we proxy requests to the original blog hosted at Cloudflare Pages
- Homepage: The homepage is dynamically constructed by:
- Parsing the RSS feed from the old blog
- Injecting new posts hosted on Val Town into the feed
- Rendering the combined content
The main index.tsx file handles proxying requests to the old blog when necessary. When a user visits a URL that corresponds to an old blog post, the request is forwarded to the original Cloudflare Pages deployment.
- The old blog URL is:
https://val-town-blog.pages.dev/
- Requests are proxied with their original headers and method
- New content is integrated seamlessly with the old content
When adding new blog posts:
- Create the post directly in Val Town
- The homepage will automatically include the new post in its listing
For modifications to the proxy behavior or homepage rendering, update the index.tsx file.