TechGuide

Building a fast Next.js blog, notes from this project

How this blog is built: written in Obsidian, published with git push, static pages on Vercel, and Neon for the parts that need a database.

Published 2 min read

Baca dalam BM

Colourful code on a computer monitor
Photo: Markus Spiske / Unsplash

This blog was built with one goal: pages must load fast and be easy to find on Google, without making life hard for the writers. Here are some short notes on how it is put together, for anyone who wants to build something similar.

Write in Obsidian, publish with git

Each article is one Markdown file in the content/ folder, which is opened as an Obsidian vault. Details such as the title, section, language and date sit in the frontmatter at the top of the file.

An article is only published when it has status: published and its date has arrived. Once changes are pushed to GitHub, Vercel rebuilds the site in about a minute. There is no CMS, no login and no database for content.

Obsidian-style links such as [[Another article title]] are turned into normal links when the site is built. Images pasted into a note are copied to the site automatically.

Static pages first

The site runs on Next.js 16 with the App Router. Almost every page is generated in advance at build time:

  • the home pages for Bahasa Melayu (/ms) and English (/en)
  • every article, section, tag and author page
  • RSS, the sitemap and the Google News sitemap

Static pages mean the browser gets complete HTML straight away. JavaScript is only used where it is really needed, such as the mobile menu, search and the subscription form.

Neon for the dynamic parts

A few things do need a database. For those we use Neon Postgres, installed through the Vercel Marketplace:

Feature What it stores
Newsletter Subscriber emails, frequency and chosen sections
Trending list Daily read counts for each article
Send a story form Tips from readers

Subscription confirmation emails are sent through Resend. Subscribers have to click the link in the email before they are added to the list.

SEO built in from the start

For a news site, SEO is not something you add at the end of a project. Every article has:

  • its own title and description, a canonical URL, and hreflang links when there is a translation
  • NewsArticle or BlogPosting structured data, including the author and the updated date
  • a share image generated automatically for social media

The site is also registered in Google Search Console, along with its sitemap.

What's next

Comments are coming, along with a moderation page for the editorial team. If you have questions about how this site is built, send them to us through the Contact form.

ShareWhatsAppXFacebook
Meja Berita

Pasukan editorial odyc