How to use this template
This template is a personal blog built with Next.js, MDX, and a clean typography-first style.
1. Project setup
Install dependencies:
bash
bun installRun local dev:
bash
bun run devBuild for production:
bash
bun run build2. Content workflow
All posts live in content/*.mdx.
Minimum frontmatter:
md
---
title: "Post Title"
date: "YYYY-MM-DD"
tags: ["tag-a", "tag-b"]
description: "Short summary"
---Slug is derived from filename. For example:
content/how-to-use-this-template.mdx->/posts/how-to-use-this-template
3. Styling and typography
Global style system:
app/globals.css
Typography configuration guide:
planning/typography_config.md
If you want to tune heading scales and weights, change values under /* Typography Config */ in app/globals.css.
4. Homepage controls
Homepage action row includes:
- GitHub
- Terminal
- Filter
- Theme toggle
Filter expands tag pills below the action row and filters post list client-side.
5. Terminal mode
Route:
/terminal
Command examples:
helplscat <slug>open <slug>clearexit
6. Newsletter
Subscription endpoint:
POST /api/newsletter
Environment variables:
RESEND_API_KEYRESEND_AUDIENCE_IDRESEND_FROM_EMAIL(optional, default is onboarding sender)SITE_URL(optional fallback used in welcome email)
Behavior:
- Subscribes contact to Resend audience.
- Sends welcome email after successful signup.
7. Deployment
Recommended: Vercel.
Before deploy:
- Add required env vars in Vercel project settings.
- Ensure your domain and sender identity are set correctly if you want production email sending.
- Push to
mainto trigger deployment.
8. Common updates you will do
- Add a new post in
content/. - Tweak styles in
app/globals.css. - Adjust homepage/action row in
components/Profile.tsx. - Update newsletter logic in
app/api/newsletter/route.ts.
This should be enough for day-to-day usage of the template.