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: use custom order of packages in API docs

Martin Adámekd36ceaa805fd
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index bd71fa4ab..2f63fe71e 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -5,6 +5,20 @@ const pkg = require('../packages/crawlee/package.json');
const [v1, v2] = pkg.version.split('.');
const version = [v1, v2].join('.');
+const packages = [
+ 'core',
+ 'cheerio-crawler',
+ 'puppeteer-crawler',
+ 'playwright-crawler',
+ 'basic-crawler',
+ 'browser-crawler',
+ 'memory-storage',
+ 'browser-pool',
+ 'utils',
+ 'types',
+];
+const packageNames = packages.map((name) => `@crawlee/${name.replace(/-crawler$/, '')}`);
+
/** @type {Partial<import('@docusaurus/types').DocusaurusConfig>} */
module.exports = {
title: 'Crawlee',
@@ -58,38 +72,10 @@ module.exports = {
{
projectRoot: `${__dirname}/..`,
changelogs: true,
- packages: [
- {
- path: 'packages/core',
- },
- {
- path: 'packages/browser-pool',
- },
- {
- path: 'packages/basic-crawler',
- },
- {
- path: 'packages/browser-crawler',
- },
- {
- path: 'packages/cheerio-crawler',
- },
- {
- path: 'packages/puppeteer-crawler',
- },
- {
- path: 'packages/playwright-crawler',
- },
- {
- path: 'packages/memory-storage',
- },
- {
- path: 'packages/utils',
- },
- {
- path: 'packages/types',
- },
- ],
+ sortPackages: (a, b) => {
+ return packageNames.indexOf(a.packageName) - packageNames.indexOf(b.packageName);
+ },
+ packages: packages.map((name) => ({ path: `packages/${name}` })),
typedocOptions: {
excludeExternals: false,
},
diff --git a/website/src/css/custom.css b/website/src/css/custom.css
index 1249045e4..8c2b10aeb 100644
--- a/website/src/css/custom.css
+++ b/website/src/css/custom.css
@@ -370,3 +370,20 @@ html .table-of-contents {
html .table-of-contents ul {
border-left: 2px solid #dfe2f5;
}
+
+/*
+.theme-doc-sidebar-menu > li:first-child::before,
+.theme-doc-sidebar-menu > li:nth-child(5)::before {
+ text-transform: uppercase;
+}
+
+.theme-doc-sidebar-menu > li:first-child::before {
+ display: block;
+ content: 'Core features';
+}
+
+.theme-doc-sidebar-menu > li:nth-child(5)::before {
+ display: block;
+ content: 'Advanced';
+}
+*/