Skip to content
Proyectos

alemoraru/nextjs-portofolio-website

Ver en GitHub

Acerca de

A highly customizable, developer-focused portfolio template built with Next.js, TypeScript, Tailwind CSS, and MDX. SEO-optimized, responsive, and designed to showcase your work, projects, and ideas.

Desarrollo web y de aplicaciones

Cómo se miden estas cifras

What you can do

  • Main dashboard (Home page), with /work, /projects, and /blog links
  • MDX support for blog posts, projects, and work items
  • Zod-validated frontmatter for all MDX content types. Invalid files are caught at build time with precise field-level error messages
  • Syntax highlighting for code blocks in MDX files

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

Next.js Developer-Themed Personal Website Template

This is a custom personal website theme built using Next.js, bootstrapped with create-next-app. It's designed as a minimal, performance-focused starting point for showcasing your work, blogs, and projects.

Next.js TypeScript React Tailwind CSS MDX Vitest Prettier ESLint License

📝 Author's Note About This Theme

This theme is generally aimed at developers and designers who want to create a personal website quickly and easily. Yes, I'm aware there are many other templates and themes available...you can literally find them all over the internet. The personal goal of building this theme was to get familiar with Next.js, and improve skills in React and TypeScript.

I also wanted to create a starter template for myself, since none of the existing templates met my exact design and functionality needs, without requiring extensive modifications. So...here we are! Feel free to use this as a starting point for your own personal website, or as a reference for doing the same thing I did: building your own custom theme!

Screenshot Pages Desktop

Screenshot Pages Phone


📋 Table of Contents


💎 Key Features

  • Main dashboard (Home page), with /work, /projects, and /blog links
  • MDX support for blog posts, projects, and work items
  • Zod-validated frontmatter for all MDX content types. Invalid files are caught at build time with precise field-level error messages
  • Syntax highlighting for code blocks in MDX files
  • Light/dark mode toggle. The classic theme switcher ;)
  • Runtime accent color picker: right-click (or long-press on touch devices) the theme toggle button to switch between 10 accent colors on the fly. The choice is remembered across visits via localStorage
  • Responsive design for mobile and desktop
  • SEO-friendly structure and metadata, including JSON-LD structured data on the home page and blog posts for Google rich results eligibility. For more context, also see Vercel's JSON-LD guide
  • Automatic sitemap.xml that discovers every blog post, project, work item, and tag page at build time. No manual updates needed when content is added or removed! (See src/app/sitemap.ts for implementation details)
  • SSR support for pagination, sorting, and filtering of blog posts, projects, and work items
  • Similar blog posts recommendations
  • Blog post categories pages
  • LLMs.txt route automatically generated from content metadata to help agents/crawlers discover your content
  • RSS.xml feed automatically generated from the blog posts available on the site
  • Dynamic Open Graph image generation for the home page, /blog, /projects, /work, and all their individual posts, items, and tag pages
  • Easy customization through a centralized configuration file (src/data/metadata.ts and src/data/content.ts) for all site content and appearance settings

🧱 Project Structure

The site is organized around the following main routes/pages:

  • 🏠 Home – /
  • 💼 Work – /work
  • 🛠️ Projects – /projects
  • ✍️ Blog – /blog

Each page is intentionally simple and clean, making it easy to customize and build upon.

✨ Minimal Configuration Required

This theme is designed with simplicity in mind. After customizing your home page, adding content is as easy as creating .mdx files:

  • Blog Posts: Drop a new .mdx file in src/data/blog/ with frontmatter (title, summary, date, tags)
  • Work Items: Add an .mdx file in src/data/work/ with your work details
  • Projects: Create an .mdx file in src/data/projects/ with project information

That's it! No manual configuration files to update, no arrays to maintain. The site automatically discovers and renders your content. Just write your content in Markdown, add frontmatter metadata, and the theme handles the rest: generating pages, navigation, filtering, and search capabilities automatically.


🚀 Getting Started

After cloning the repository, install the dependencies first:

npm install

or via pnpm (recommended):

pnpm install

This also sets up the project's Git hooks (via Husky) automatically, no extra setup needed. See Code Quality & Guidelines for what those hooks check.

To start your development environment locally, run the following command in the root directory of the project:

npm run dev

or via pnpm (recommended):

pnpm dev

Once the server is running, open http://localhost:3000 in your browser to view the homepage. Running this command starts the app in development mode with hot-reloading enabled, so any changes you make to the code will automatically reflect in the browser without needing to restart the server.

You can also build the project for production using:

npm run build

or via pnpm:

pnpm build

And then start the production server with:

npm start

or via pnpm:

pnpm start

🎨 Customization

This template is designed for easy customization! All content and configuration is centralized in the src/data/ folder. Here's how to make it yours:

1. Update Site Metadata (src/data/metadata.ts)

Edit src/data/metadata.ts to customize your site's SEO and social media information:

  • theme: Choose the site's default accent color (e.g., blue, green, purple, amber, etc.). Visitors can override this at runtime by right-clicking (or long-pressing on touch devices) the theme toggle button; their choice is saved in localStorage and takes precedence over this default on their next visit
  • title: Your site/portfolio title
  • description: A brief description of your portfolio
  • keywords: Array of relevant keywords for SEO
  • author: Your name and website URL
  • siteUrl: Your actual domain (e.g., https://yourdomain.com)
  • social.twitter: Your Twitter/X handle (e.g., @yourhandle)
  • ogImage: (Optional) Path to a custom home page OG image in your public/ folder (e.g. "/og-image.png"). Set to null to use the auto-generated dynamic image instead

2. Update Personal Information (src/data/content.ts)

Edit src/data/content.ts to customize your homepage and footer:

Homepage Intro:

  • name: Your name (displayed in the heading)
  • introParagraphs: Array of introduction paragraphs about yourself
  • facts: Your current company, education, location, languages, and role
  • additionalFacts: Custom facts with icons (hobbies, interests, etc.)

Footer:

  • copyrightName: Your name for the copyright notice
  • socialLinks: Your social media URLs (just add the URLs, icons are automatic!)
    • Supported platforms: GitHub, LinkedIn, Goodreads, Instagram, Twitter/X, Reddit, Dribbble, YouTube, Bluesky, Stack Overflow, Email
    • Leave any field empty ("") to hide that social link
  • showVersionAndAttribution: Set to false to hide the template attribution (true by default). Leaving the attribution is appreciated but not required!

3. Add Your Content (.mdx files)

Create .mdx files in the respective folders to add your content:

  • Blog Posts: src/data/blog/your-post.mdx
  • Projects: src/data/projects/your-project.mdx
  • Work Experience: src/data/work/your-job.mdx

Each .mdx file should include frontmatter with metadata (title, date, tags, etc.). The site automatically discovers and renders all content from these files!

Note: The blog, project, and work content that comes with this template is dummy, artificially generated text. It only exists to showcase what the website can do, so replace or delete it with your own content.

4. Update Visual Assets

  • Favicon: Replace /public/icons/favicon.ico with your own icon
  • OG Image (optional): Place a 1200×630 px image in /public/ and set ogImage in src/data/metadata.ts to its path to use a custom home page preview. Set ogImage to null to use the auto-generated image instead

That's it! 🎉 The template automatically uses your configuration and content throughout the site. No need to modify components or understand the codebase!


🔍 SEO

This template ships with a comprehensive SEO setup out of the box: global metadata, Open Graph and Twitter Card tags, dynamic OG image generation, JSON-LD structured data, a sitemap, a robots.txt, an RSS feed, and an llms.txt route.

Dynamic Open Graph images

Per-page Open Graph images are generated at build time using Next.js's built-in ImageResponse API. When someone shares a link on social media or a messaging app, they get a branded preview image instead of a blank card.

Blog post Work item Project
Blog OG example Work OG example Project OG example
Blog tag
Tag OG example
Route Image content
/ Auto-generated (name, role, company, location), or your custom image if ogImage is set
/blog "All Posts" heading, total post count, and 3 most recent post titles
/projects "All Projects" heading, total project count, and up to 4 project names
/work "Work Experience" heading, total company count, and up to 4 companies with their role
/blog/[slug] Post title, summary, tags, and date
/blog/tag/[tag] Tag name, post count, and latest 3 post titles
/work/[slug] Company name, role, description, period, and locations
/projects/[slug] Project title, description, tech stack, and duration

The home page generates a dynamic OG image by default. To use a custom static image instead, set siteMetadata.ogImage in src/data/metadata.ts to its path in the public/ folder (e.g. "/og-image.png"); set it to null to go back to the generated image. All generated images pick up the accent color from siteMetadata.theme; changing the theme updates the color across the entire site and in all OG images automatically. Note that OG images are generated at build time from this default and always reflect it, regardless of any per-visitor accent color chosen at runtime via the theme toggle button's color picker.

Images are generated at build time and cached. With the dev server running, you can preview any of them directly:

http://localhost:3000/opengraph-image
http://localhost:3000/blog/opengraph-image
http://localhost:3000/projects/opengraph-image
http://localhost:3000/work/opengraph-image
http://localhost:3000/blog/your-post-slug/opengraph-image
http://localhost:3000/blog/tag/typescript/opengraph-image
http://localhost:3000/work/your-company-slug/opengraph-image
http://localhost:3000/projects/your-project-slug/opengraph-image

Full SEO reference

For a complete breakdown of every SEO feature and the steps you need to take when customizing the template (setting your domain, replacing assets, submitting to Google Search Console, validating structured data, etc.), see docs/SEO.md.


🧭 Roadmap

Planned improvement ideas and future features:

  • ❔ Add guides (i.e., READMEs) for creating blog/project/work pages
  • 🖼 Add theme customization options:
    • Centralized config file for content and appearance settings
    • Color palette options
    • Runtime accent color picker (right-click/long-press the theme toggle button)
  • ✨ Add layout variations for customization (e.g., sidebar, grid, etc.)

📚 Learn More

Want to dig deeper into Next.js, or other resources, and see how this project was built? Check out the following resources:


▲ Deployment

The fastest way to deploy this app is via Vercel, the platform made by the creators of Next.js.

For more detailed instructions, check out the Next.js deployment guide. If you do decide to use Vercel, this repository includes by default Analytics and Speed Insights integration.

Note: This does not mean you have to use Vercel. You can deploy this app on any platform that supports Node.js, such as Netlify, Render, AWS Amplify, or much more.

Domain configuration (Vercel)

Search engines need one canonical host. The siteUrl in src/data/metadata.ts drives every canonical tag, the sitemap, robots.txt, and the JSON-LD URLs, so your domain settings must redirect to that same host. If they point the other way (e.g. the apex redirects to www, but pages declare the apex as canonical), Google sees a redirect loop and leaves pages as "Discovered – currently not indexed" or "Alternative page with proper canonical tag".

In Vercel → Project → Settings → Domains:

  1. Add both yourdomain.com and www.yourdomain.com.
  2. Pick the host that matches siteUrl as the primary (this guide assumes the apex, yourdomain.com).
  3. Set the other host to redirect to it with a 308 (Permanent) redirect, not 307 (Temporary).
  4. Leave yourdomain-com.vercel.app redirecting to the primary host. A temporary redirect is fine there since it isn't linked or in the sitemap, but make sure it targets the primary host directly to avoid an extra hop.

Verify (each should match):

curl -sI https://www.yourdomain.com/blog | grep -i -E "^(HTTP|location)"   # 308 → https://yourdomain.com/blog
curl -sI https://yourdomain.com/blog | grep -i -E "^HTTP"                  # 200
curl -s https://yourdomain.com/blog | grep -o '<link rel="canonical"[^>]*>' # href="https://yourdomain.com/blog"

If you prefer www as primary, set siteUrl to https://www.yourdomain.com instead and flip the redirect. Never configure both directions. After changing domains, resubmit sitemap.xml in Google Search Console and use "Validate fix" on the affected reports.


🛠 Tech Stack

This project uses:


💎 Code Quality & Guidelines

This project follows best practices for code quality and style:

  • Testing with Vitest for unit and component testing
    • Run pnpm test to execute all tests
    • Run pnpm test:watch to run tests in watch mode
    • Run pnpm test:ui to open the Vitest UI
    • Run pnpm test:coverage to generate a code coverage report (we use v8 for fast coverage reporting). Note that coverage is being generated in the coverage/ directory, and the report can be viewed by opening coverage/index.html in a browser.
    • Tests are located in the tests/ directory, mirroring the src/ structure
    • Check out vitest.config.ts for configuration details
  • Code Formatting using Prettier
    • Run pnpm format:check to check for formatting issues
    • Run pnpm format:write to automatically format the code
    • Check out .prettierrc.json & .prettierignore files for configuration details
  • Linting with ESLint to ensure code quality
    • Run pnpm lint:check to check for linting issues
    • Run pnpm lint:write to automatically fix linting issues where possible
    • Check out eslint.config.mjs file for configuration details
  • Modular and reusable (React) components
  • Git Hooks via Husky + lint-staged, installed automatically on pnpm install, mirrors the checks run in CI (.github/workflows/code-quality.yml)
    • pre-commit: runs ESLint and Prettier (via lint-staged) on staged files only
    • pre-push: runs the full test suite (pnpm test)
    • Check out the .husky/ directory for the hook scripts

Note: To run both prettier and ESLint checks together, you can use the command: pnpm format-lint or pnpm lint-format.

⭐ Star History

🪪 License

This project is licensed under the MIT License.

💬 Feedback & Contributions

Got suggestions, issues, or ideas for improvement? Feel free to open an issue or submit a pull request. Contributions are always welcome! Please see the CONTRIBUTING.md file for more details.

Explorar proyectos relacionados

Cargando…