Sitemap generator for next.js. Generate sitemap(s) and robots.txt for all static/pre-rendered/dynamic/server-side pages.
next-sitemap is a powerful tool designed for generating sitemaps effortlessly within your Next.js projects. With its user-friendly configuration and robust feature set, it streamlines the process of creating both static and dynamic sitemaps, making it a valuable asset for developers focused on SEO and website organization.
This tool is particularly beneficial for those seeking to improve their site's visibility in search engines while managing the complexities of sitemap generation. Whether you are working on a personal project or a large-scale application, next-sitemap provides the flexibility and functionality you need to keep your sitemaps organized and optimized.
Easy Installation: Simply create a configuration file named next-sitemap.config.js in your project's root, and next-sitemap will automatically load your environment variables.
Custom Config File Support: If you prefer not to use the default configuration, you can specify your custom config file by passing --config <your-config-file>.js in the build command.
Index Sitemap Generation: From version 2.x onwards, next-sitemap generates an Index Sitemap that contains URLs of all other generated sitemap endpoints, with an option to disable it for smaller sites.
Automatic Splitting of Large Sitemaps: If your sitemap exceeds 7000 URLs, next-sitemap automatically splits it into multiple files, facilitating better performance and organization.
Post-build Integration: Easily add next-sitemap to your post-build scripts, making it simple to automate the sitemap building process after deployment.
Dynamic and Server-Side Sitemap Generation: next-sitemap supports the creation of dynamic sitemaps, ensuring that your site's structure is accurately represented for search engines.
Typescript JSDoc Support: For developers using Typescript, next-sitemap offers JSDoc, enhancing code quality and making it easier to integrate into existing codebases.
Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.
React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components
ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.
TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.