• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
stevekrouse

stevekrouse

original-vt-blog

Val Town Blog, hosted on Val Town
Public
Like
original-vt-blog
Home
Code
5
blog-posts
2
components
3
utils
1
README.md
H
index.tsx
Branches
1
Pull requests
Remixes
1
History
Environment variables
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.
Sign up now
Code
/
blog-posts
/
val-town-migration.md
Code
/
blog-posts
/
val-town-migration.md
Search
4/2/2025
Viewing readonly version of main branch: v64
View latest version
val-town-migration.md
title:
Migrating the Val Town Blog
description:
How we migrated the Val Town Blog from Astro and Cloudflare Pages to be hosted directly on Val Town.
pubDate:
2025-03-30T00:00:00.000Z
author:
Val Town Team

Migrating the Val Town Blog

We recently migrated the Val Town Blog from Astro and Cloudflare Pages to be hosted directly on Val Town. This post explains the migration process and the architecture of the new blog system.

The Old Architecture

Previously, our blog was:

  • Built with Astro, a modern static site generator
  • Deployed to Cloudflare Pages
  • Updated through a Git-based workflow

While this setup worked well, we wanted to dogfood our own product and host the blog directly on Val Town.

The New Architecture

The new blog system:

  1. Hosts new blog posts directly on Val Town as markdown files
  2. Proxies requests for old blog posts to the original Cloudflare Pages deployment
  3. Constructs the homepage by combining posts from both sources

Technical Implementation

We implemented the new blog system using:

  • React for rendering components
  • Tailwind CSS for styling
  • Unified/Remark/Rehype for markdown processing
  • RSS Parser for fetching posts from the old blog
// Example of how we fetch blog posts async function getAllBlogPosts() { // Get local posts from markdown files const localPosts = await getLocalBlogPosts(); // Get posts from RSS feed const rssPosts = await getRssBlogPosts(); // Merge and sort by date return [...localPosts, ...rssPosts].sort((a, b) => { return new Date(b.pubDate).getTime() - new Date(a.pubDate).getTime(); }); }

Benefits of the New Approach

  • Simplified workflow: We can add new posts directly in Val Town
  • Better integration: The blog is now part of our product ecosystem
  • Improved performance: We can optimize the delivery of blog content
  • Dogfooding: We're using our own product for our content

Conclusion

This migration demonstrates how Val Town can be used to host and serve content while maintaining compatibility with existing systems. We're excited to continue improving the blog and adding new features in the future.

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.