akalp.co — personal website and blog for Hasan Akalp. Built with Next.js (App Router) and TypeScript. Includes portfolio, blog, and contact pages.
Run the development server:
npm install
npm run devOpen http://localhost:3000 in your browser to view the site. Edit src/app/page.tsx (and other files under src/) to iterate; changes hot‑reload during development.
dev— start the development servergenerate:og— generate Open Graph images inpublic/og/build— generate OG images, build, and optimize images for static exportstart— run the production serverlint— run lint checksformat— apply Prettier formatting to the codebasetypecheck— run the TypeScript compiler without emitting files
src/app/— Next.js App Router routes, layouts, and route-level UIsrc/components/— shared UI componentssrc/lib/— shared utilities (Markdown rendering, blog helpers, reading time)src/config/— app configuration (metadata, fonts, image sizes)src/data/— navigation and other site datasrc/types/— TypeScript typessrc/assets/fonts/— local font files (used bynext/font/localand OG generation)content/blog/— Markdown posts with front‑matter:title,date,description,tagspublic/— static assets (including generatedpublic/og/images)
Create a .env.local file in the project root (or configure environment variables in your hosting provider) and set:
NEXT_PUBLIC_SITE_URL— canonical base URL used for metadata, sitemap, RSS, and social previews. Example:https://akalp.co.
When deploying to Cloudflare Pages (or any static hosting), configure the same variable in the project settings so SSG uses the correct value.
Build the app and run it in any Node.js environment:
npm run build
npm startThis project is configured for static export via output: "export" in next.config.ts.
- Build command:
next build - Output directory:
out - Note: Do not use
next startwith static export. Deploy the contents ofout. - Optional local preview of the static export:
npm run build
npx serve outRefer to the official Next.js documentation for hosting options and production best practices: https://nextjs.org/docs/app/building-your-application/deploying
- Next.js documentation: https://nextjs.org/docs
- Learn Next.js (tutorial): https://nextjs.org/learn