My Next.js blog
It worked just fine.
I wanted to play with a modern stack.
It's still a statically-generated site and it's deployed via GitHub Pages.
I think MDX is the most interesting bit so far: it lets you embed React components directly into your Markdown source files.
For example, here I'm embedding a counter react component with
Since this uses Next.js, it also allows me to add dynamic features to the site (via server-side (SSR) or client-side (SPA) rendering). If I end up going that way, I could host it on something like Vercel or Netlify. Also I'd be lying if I said I wasn't inspired by Brian Lovin's new website, which is a webapp deployed to Vercel.
Deployment to GitHub Pages
Here's what happens when I push to the
This creates an optimized version of the site in
This exports the site to static HTML that doesn't need a node server to run.
gh-pages branch on my repo to see the exported site structure
This action pushes the exported site to
gh-pages, which is the branch that GitHub Pages uses to host the site.
Check out the code for this site on GitHub.