HomePostsGetting Started

Getting Started

Published Oct 12, 2024
Updated Oct 27, 2024
1 minutes read

Installation

Follow these simple steps to get started:

pnpm install
pnpm dev

This will install the necessary dependencies and start the development server. Once the server is running, you can view your portfolio at http://localhost:3000.

Environment Variables

The following environment variables are required to run the application:

Run the following command to create a .env.local file and add the required environment variables:

vercel env pull

Then, update the values in the .env.local file with your own values.

Scripts

The following scripts are available to help you manage development, build processes, and linting:

build

Runs the linting process, updates MDX file timestamps, and then builds the Next.js application for production. This ensures code quality and proper SEO metadata before deployment.

pnpm build

postbuild

Automatically generates the sitemap after the build process completes. This script uses the next-sitemap package to create a sitemap.xml file for better SEO and discoverability.

pnpm postbuild

mdx:timestamps

Runs a custom Node.js script that updates timestamps (created and updated) in your MDX files, automating the time management for blog posts.

pnpm mdx:timestamps

lint:style

Runs stylelint on all CSS files to check and automatically fix any style issues. This ensures consistent and clean CSS code.

pnpm lint:style

lint:biome

Runs the Biome linter to check and fix JavaScript/TypeScript code. This keeps your codebase clean and error-free.

pnpm lint:biome

lint:prettier

Runs Prettier to format your code according to your project's style guide. This improves code readability and consistency.

pnpm lint:prettier

lint

A combination of the style, Prettier, and Biome linting scripts, run together to ensure the entire codebase follows consistent style and format rules.

pnpm lint