Recent Blog Posts

Getting started with React components in Astro? Check these things!

Yes, you can write and render your React components in your Astro page. But remember, Astro *isn't* React, and you might be getting error messages when you *totally know* your React component should work. It's not complicated to establish the Astro-React relationship, but you might not be used to doing these things. . .


Read more

Astro is a learner's paradise!

One of Astro's selling points has been that you can bring your own mix-and-match components... but I didn't really get the power of that as a *learner* until just now, listening to Fred K. Schott interviewed on


Read more

Setting up React Testing Library in an Astro project

I am starting to experiment with React unit testing, and since my Astro blog contains React components, I wanted to see what happens when I tried adding React Testing Library to Astro!


Read more

See more posts ...

The Code:

This is src/pages/blog.astro which is generated from markdown files located in src/pages/posts/ using:

let allPosts = Astro.fetchContent('./posts/*.md');
allPosts.sort((a, b) => new Date( - new Date(;
  {allPosts.slice(0, 3).map((post) => (
      <p>{new Date(, 10)}</p>
      <a href={post.url}>Read more</a>