Skip to content

feat: add robots.txt generator with tests#1

Open
Victor1890 wants to merge 3 commits intoCorentints:mainfrom
Victor1890:feat/robots
Open

feat: add robots.txt generator with tests#1
Victor1890 wants to merge 3 commits intoCorentints:mainfrom
Victor1890:feat/robots

Conversation

@Victor1890
Copy link

  • Implemented TanStackRouterRobotGenerator class for generating robots.txt files based on provided sitemap options and policies.
  • Added methods for resolving policies, building sitemap URLs, and normalizing paths.
  • Created unit tests for the generator to validate default policies, sitemap inclusion, and custom configurations.
  • Introduced a helper function, generateRobotsTxt, for easier usage of the generator.

- Implemented TanStackRouterRobotGenerator class for generating robots.txt files based on provided sitemap options and policies.
- Added methods for resolving policies, building sitemap URLs, and normalizing paths.
- Created unit tests for the generator to validate default policies, sitemap inclusion, and custom configurations.
- Introduced a helper function, generateRobotsTxt, for easier usage of the generator.
- Moved `TanStackRouterRobotGenerator` to a new file `src/generator/robots.ts` and updated its implementation.
- Created a new `TanStackRouterSitemapGenerator` class in `src/generator/sitemap.ts` for sitemap generation.
- Updated `generateRobotsTxt` function to utilize the new `TanStackRouterRobotGenerator`.
- Adjusted imports across the codebase to reflect the new structure.
- Updated tests to accommodate the changes in the generator structure.
@Victor1890 Victor1890 marked this pull request as ready for review February 14, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant