Skip to content

Latest commit

 

History

History
106 lines (70 loc) · 4.51 KB

README.md

File metadata and controls

106 lines (70 loc) · 4.51 KB

Rishit Patel's Default Next.js Starter

This is a starter template for Next.js projects. It's a simple, clean, and modern starter template that includes Tailwind CSS, shadcn/ui, and more. It's built with new app directory structure but it also includes the old pages directory structure for backwards compatibility. If you want to use only the old pages directory structure, then you can use the rp-nextjs-starter-pages-dir starter template.

Popular Projects Built With This Starter Template:

Getting Started

Table of Contents:

⚡️ Quick Start

Deploy to Netlify Deploy with Vercel

How to use:

yarn create next-app -e https://github.com/imrishit98/rp-nextjs-starter
# or
npx create-next-app -e https://github.com/imrishit98/rp-nextjs-starter

🚀 Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying src/app/page.js. The page auto-updates as you edit the file.

If you want to use the old pages directory structure, then you can use the rp-nextjs-starter-pages-dir starter template or just create pages directory manually and move the files to it.

📦 Deployment

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

🔍 SEO

This starter template includes built-in SEO features to help improve your website's search engine visibility.

robots.js

The src/app/robots.js file generates a robots.txt file for your website. It uses the siteConfig to set the host and sitemap URL. You can customize the rules to allow or disallow specific paths for web crawlers.

To modify the robots.txt settings:

  1. Open src/app/robots.js
  2. Adjust the rules array to add or modify crawler instructions
  3. Update the siteConfig in site-config.js if needed

sitemap.js

The src/app/sitemap.js file automatically generates a sitemap for your website based on the pages in your src/app directory. It helps search engines discover and index your pages more efficiently.

Key features:

  • Recursively scans the src/app directory for pages
  • Excludes specified paths (e.g., API routes, private pages)
  • Handles dynamic routes and nested folders

To customize the sitemap generation:

  1. Open src/app/sitemap.js
  2. Modify the ignorePaths array to exclude additional paths if needed
  3. Adjust the changeFrequency and priority values for pages as required
  4. Update the siteConfig in site-config.js to set the correct base URL

Remember to update your site-config.js file with the correct URL for your website to ensure proper functionality of both the robots.txt and sitemap features.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

📧 Contact

If you want to contact me you can reach me at rishitpatel.com/contact.

📚 Resources