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:
- aitools.fyi - Find the best ai tools!
- PDFPeer - Chat with any document!
- Amazing Newsletters - Find the best newsletters!
- revrn - Idea to revenue in days!
Table of Contents:
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
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.
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.
This starter template includes built-in SEO features to help improve your website's search engine visibility.
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:
- Open
src/app/robots.js
- Adjust the
rules
array to add or modify crawler instructions - Update the
siteConfig
insite-config.js
if needed
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:
- Open
src/app/sitemap.js
- Modify the
ignorePaths
array to exclude additional paths if needed - Adjust the
changeFrequency
andpriority
values for pages as required - Update the
siteConfig
insite-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.
This project is licensed under the MIT License - see the LICENSE file for details.
If you want to contact me you can reach me at rishitpatel.com/contact.
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Tailwind CSS Documentation - learn about Tailwind CSS features and API.
- shadcn/ui Documentation - learn about shadcn/ui.