Creating a Blog with Next.js and Markdown - Part 2

This is in continuation to Part 1 What is great about the way we did this (using Next.js) is - we can now export this as a static website. The static website can be deployed anywhere now! Update build script - use next export Notice in package.json, there is a command called build. This is build script. npm run build npm run build will build for production, but there is one more command called next export that will export you site as a static website....

April 11, 2022 · 2 min · Anant

Creating a Blog with Next.js and Markdown - Part 1

Special mention to Traversy Media for content that is referenced here. Next.js Setup and Styling $ npx create-next-app blog npm i marked gray-matter To run (opens default app): npm run dev ready - started server on 0.0.0.0:3000, url: http://localhost:3000 wait - compiling... event - compiled client and server successfully in 9s (125 modules) Deleting the unwanted: Not using api routes, so delete pages/api folder index.js is home page Each page in Next....

April 10, 2022 · 6 min · Anant