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.

1.2 KB
Raw Blame
import Link from '@docusaurus/Link';
import { useLocation } from '@docusaurus/router';
import { useThemeConfig } from '@docusaurus/theme-common';
import useBaseUrl from '@docusaurus/useBaseUrl';
import ThemedImage from '@theme/ThemedImage';
import clsx from 'clsx';
import React from 'react';

import styles from './styles.module.css';

export default function Logo() {
    const {
        navbar: { logo },
    } = useThemeConfig();
    const javascriptLogo = {
        light: useBaseUrl('img/crawlee-javascript-light.svg'),
        dark: useBaseUrl('img/crawlee-javascript-dark.svg'),
    };
    const languageAgnosticLogo = {
        light: useBaseUrl(logo.src),
        dark: useBaseUrl(logo.srcDark || logo.src),
    };
    const location = useLocation();
    const isOnLanguageAgnosticPage = location.pathname === '/' || location.pathname.includes('/blog');
    return (
        <Link
            className={clsx(styles.logoImage, 'sidebarLogo')}
            to={isOnLanguageAgnosticPage ? '/' : '/js'}
        >
            <ThemedImage
                alt={isOnLanguageAgnosticPage ? 'Crawlee' : 'Crawlee JavaScript'}
                sources={isOnLanguageAgnosticPage ? languageAgnosticLogo : javascriptLogo}
            />
        </Link>
    );
}