Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

7.4 KB
Raw Blame
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="noindex, nofollow">
    <link rel="canonical" href="https://docs.pipelex.com/latest/">
    <title>Page not found | Pipelex Documentation</title>
    <style>
        :root {
            color-scheme: dark;
            --bg: #2e303e;
            --panel: #393b4d;
            --text: #f1f3f8;
            --muted: #b6bdd1;
            --accent: #45bf9f;
            --accent-hover: #62d4b7;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            min-height: 100vh;
            display: grid;
            place-items: center;
            padding: 24px;
            background: radial-gradient(circle at top, #3a3d52 0%, var(--bg) 55%);
            color: var(--text);
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        main {
            max-width: 720px;
            padding: 32px;
            border-radius: 18px;
            background: rgba(57, 59, 77, 0.92);
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
        }

        h1 {
            margin: 0 0 12px;
            font-size: clamp(2rem, 4vw, 2.8rem);
            line-height: 1.1;
        }

        p {
            margin: 0 0 12px;
            color: var(--muted);
            line-height: 1.6;
        }

        a {
            color: var(--accent);
            text-decoration: none;
        }

        a:hover {
            color: var(--accent-hover);
        }

        .actions {
            margin-top: 20px;
        }

        .button {
            display: inline-block;
            padding: 12px 18px;
            border-radius: 999px;
            background: var(--accent);
            color: #102019;
            font-weight: 600;
        }

        .button:hover {
            color: #102019;
            background: var(--accent-hover);
        }
    </style>
    <script>
        const path = window.location.pathname;
        // Get path segments (e.g., "/latest/foo/bar" → ["latest", "foo", "bar"])
        const segments = path.split('/').filter(seg => seg);
        const firstSegment = segments[0];

        // Check if it's a version: "latest", "pre-release", or starts with "0." (e.g., "0.17")
        const hasVersion = firstSegment === 'latest' || firstSegment === 'pre-release' || (firstSegment && firstSegment.startsWith('0.'));

        // Check if we're on a version's root 404 page (exactly /{version}/404.html)
        const isVersionRoot404 = segments.length === 2 && segments[1] === '404.html';

        // Rewrite old URL prefixes to new clean paths
        const pathRewrites = {
            'home/1-features/': 'features/',
            'home/2-get-started/': 'get-started/',
            'home/3-understand-pipelex/': 'viewpoint/',
            'home/4-cookbook-examples/': 'cookbook/',
            'home/5-setup/': 'setup/',
            'home/6-build-reliable-ai-workflows/': 'building-methods/',
            'home/7-configuration/': 'configuration/',
            'home/8-analytics/': 'analytics/',
            'home/9-tools/': 'tools/',
            'home/10-advanced-customizations/': 'advanced/',
            'under-the-hood/temporal-deployment': 'distributed-execution',
            'under-the-hood/temporal-integration': 'under-the-hood/runtime-bridge-and-transport',
            'distributed-execution/temporal': 'distributed-execution',
            'distributed-execution/cluster-setup': 'distributed-execution',
            'distributed-execution/workers': 'distributed-execution',
            'distributed-execution/task-routing': 'distributed-execution',
            'distributed-execution/observability': 'distributed-execution',
            'cookbook/simple-ocr': 'cookbook',
            'cookbook/invoice-extractor': 'cookbook',
            'cookbook/advisory-board': 'cookbook',
            'cookbook/blog-article-generator': 'cookbook',
            'cookbook/design-slides': 'cookbook',
            'cookbook/discord-newsletter': 'cookbook',
            'cookbook/extract-dpe': 'cookbook',
            'cookbook/extract-gantt': 'cookbook',
            'cookbook/extract-generic': 'cookbook',
            'cookbook/extract-invoice': 'cookbook',
            'cookbook/extract-markdown': 'cookbook',
            'cookbook/extract-proof-of-purchase': 'cookbook',
            'cookbook/extract-slides': 'cookbook',
            'cookbook/extract-table': 'cookbook',
            'cookbook/gen-expense-data': 'cookbook',
            'cookbook/gen-synthetic-data': 'cookbook',
            'cookbook/generate-image': 'cookbook',
            'cookbook/hello-world': 'cookbook',
            'cookbook/summarize': 'cookbook',
            'cookbook/validate-expense-data': 'cookbook',
            'cookbook/write-screenplay': 'cookbook',
            'cookbook/write-tweet': 'cookbook',
            'cookbook/cv-batch-screening': 'get-started/cv-batch-screening',
            'cookbook/using-inference-plugins': 'under-the-hood/writing-an-inference-plugin',
        };

        // A one-segment page under `errors/`, which a class-derived `type` URI names: an API-authored
        // error's, or a retired per-class page that a release without the static redirects of
        // mkdocs.yml's `redirect_maps` serves as missing. Send it to the error codes' index. A code's
        // page is several segments deep, so this never catches one.
        const retiredErrorPage = /^\/errors\/[a-z0-9]+(?:-[a-z0-9]+)*\/?$/;

        function rewritePath(p) {
            if (retiredErrorPage.test(p)) {
                return '/errors/';
            }
            for (const [oldPrefix, newPrefix] of Object.entries(pathRewrites)) {
                if (p.includes(oldPrefix)) {
                    return p.replace(oldPrefix, newPrefix);
                }
            }
            return p;
        }

        if (!hasVersion) {
            // No version in URL, rewrite old paths then redirect to /latest/...
            const rewritten = rewritePath(path);
            const newUrl = '/latest' + rewritten + window.location.search + window.location.hash;
            window.location.replace(newUrl);
        } else if (isVersionRoot404 && firstSegment !== 'latest') {
            // We tried a version's 404.html but it doesn't exist (invalid version)
            // Fall back to /latest/404.html
            window.location.replace('/latest/404.html');
        } else if (!isVersionRoot404) {
            // Has version but not on 404 page, rewrite old paths then redirect to that version's styled 404 page
            const remainingPath = '/' + segments.slice(1).join('/');
            const rewrittenPath = rewritePath(remainingPath);
            const version404Url = rewrittenPath !== remainingPath
                ? '/' + firstSegment + rewrittenPath + window.location.search + window.location.hash
                : '/' + firstSegment + '/404.html';
            window.location.replace(version404Url);
        }
    </script>
</head>
<body>
    <main>
        <h1>Page not found</h1>
        <p>The page you requested does not exist in this documentation version.</p>
        <p>If you followed an old link, the redirect rules may already have sent you to the closest matching page under <code>/latest/</code>.</p>
        <div class="actions">
            <a class="button" href="/latest/">Go to the latest docs</a>
        </div>
    </main>
</body>
</html>