Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

docs: try to implement redirects for URLs with trailing slash so they dont flash 404

Martin Adámek1ba558704e04
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index c8bb4ed86..722ee9796 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -107,6 +107,13 @@ module.exports = {
to: '/docs/introduction',
},
],
+ createRedirects(existingPath) {
+ if (!existingPath.endsWith('/')) {
+ return `${existingPath}/`;
+ }
+
+ return undefined; // Return a falsy value: no redirect created
+ },
},
],
[