=============================================================
This is a simple blog project built with Next.js. It uses the traditional pages directory for routing, making it suitable for small projects like blogs, portfolios, or landing pages.
nextjs-blog-template/
│
├── .gitignore # Files and directories to ignore in version control
├── .next/ # Build output (auto-generated)
├── .nvmrc # Node.js version configuration
├── next.config.js # Next.js configuration
├── package.json # Project metadata and dependencies
├── pages/ # Contains all page components (routes)
├── public/ # Static assets (accessible via URL)
├── README.md # Project documentation
├── styles/ # CSS files for styling
-
pages/This folder defines routes using files. Each file corresponds to a route.- Example:
pages/index.jsis the home route (/).
- Example:
-
public/Contains static files like images, icons, and other assets. These files can be accessed directly via the browser, for example:/favicon.ico /vercel.svg -
styles/Contains CSS files for styling the application.global.css: Global styles applied across the app.Home.module.css: Scoped styles specific to the home page.
-
.gitignoreLists files and folders to exclude from version control. This prevents unnecessary files likenode_modulesand.nextfrom being committed to Git. -
next.config.jsUsed to customize the default Next.js configuration. -
package.jsonIncludes project information, scripts, and dependencies.
-
Clone the repository:
git clone <repository-url> cd nextjs-blog -
Install dependencies:
npm install -
Run the development server:
npm run dev -
Open your browser and go to:
http://localhost:3000
This project follows the traditional pages directory routing approach in Next.js. It's a simple and effective setup for smaller applications like blogs or portfolios. The next step will be connecting a CI/CD pipeline to this project for DEVOPS.
Feel free to explore the code, customize the styles, and extend the functionality as needed.