Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
docs: redirect jan.ai/docs to the live Stable docs site (#9277)
James Dam693a28c9e3ff
diff --git a/.github/workflows/jan-docs.yml b/.github/workflows/jan-docs.ymlindex 5690daaf5..daef09352 100644--- a/.github/workflows/jan-docs.yml+++ b/.github/workflows/jan-docs.yml@@ -69,7 +69,7 @@ jobs:run: rm -rf out/* .next/*- name: Build websiteworking-directory: docs- run: export NODE_ENV=production && yarn build && cp _redirects out/_redirects && cp _headers out/_headers+ run: export NODE_ENV=production && yarn build && yarn postbuild && cp _redirects out/_redirects && cp _headers out/_headers- name: Publish to Cloudflare Pages PR Preview and Stagingif: github.event_name == 'pull_request'diff --git a/docs/_redirects b/docs/_redirectsindex 6f3155482..e6c3c9f2f 100644--- a/docs/_redirects+++ b/docs/_redirects@@ -1,11 +1,4 @@-# New rules go at the top of this file: the platform stops applying it part way-# down. Observed 2026-09-25 - in production every rule from /docs/desktop/mac-# down to the end of the file is inert, while the same line placed above that-# point serves its redirect. This is not a documented rule, byte or line limit:-# adding rules here does not displace the ones that work. Repairing the rest of-# the file is a separate change.-#-# Jan ADK: the SDK pages moved under /docs/agent/adk.+# Existing marketing and legacy redirects; static rules before wildcard rules./docs/agent/sdk /docs/agent/adk 302/docs/agent/sdk/ /docs/agent/adk/ 302/docs/agent/sdk-nightly /docs/agent/adk-nightly 302@@ -18,7 +11,6 @@/docs/agent/sdk-tools/ /docs/agent/adk-tools/ 302/docs/agent/sdk-runtime /docs/agent/adk-runtime 302/docs/agent/sdk-runtime/ /docs/agent/adk-runtime/ 302-/about /handbook 302/about/ /handbook 302/about/community /handbook 302@@ -36,8 +28,6 @@/about/wall-of-love /handbook 302/about/acknowledgements /handbook 302/about/faq /handbook 302-/about/* /handbook 302-/handbook/contributing-to-jan/ /handbook 302/handbook/core-contributors/how-we-hire/ /handbook 302/handbook/engineering-excellence/ /handbook 302@@ -50,7 +40,6 @@/handbook/betting-on-open-source /handbook/why/open-source 302/handbook/why/open-superintelligence /handbook/why/why-jan-exists 302/handbook/why/betting-on-open-source /handbook/why/open-source 302-/how-we-work/product-design /handbook 302/how-we-work /handbook/who/how-we-work 302/team/team /handbook/who/who-we-are 302@@ -62,16 +51,11 @@/marketplace /docs/ 302/training /docs/ 302/documentation /docs/ 302-/down /download 302-/download/latest/* /download 302-/install/linux /docs/desktop/install/linux 302/install/mac /docs/desktop/install/mac 302/install/windows /docs/desktop/install/windows 302-/install/* /docs/desktop 302/getting-started/install/linux /docs/desktop/install/linux 302-/cortex/vision /handbook/why/why-jan-exists 302/cortex/assistants /docs/ 302/cortex/build-extension /docs/ 302@@ -94,21 +78,14 @@/cortex/rag/overview /docs/ 302/cortex/server /docs/ 302/cortex /docs/ 302-/cortex/* /docs/ 302-/api-reference /docs/ 302-/api-reference/* /docs/ 302-/developer/framework/engineering/chats /docs/ 302/developer/framework/engineering/threads/ /docs/ 302/developer/framework/product/chat /docs/ 302/developer/framework/product/settings /docs/desktop/settings 302/developer /docs/ 302-/developer/* /docs/ 302-/desktop /docs/desktop 302/desktop/ /docs/desktop 302-/integrations/function-calling/interpreter /docs/ 302/integrations/coding/continue-dev /docs/desktop 302/integrations/continue/ /docs/desktop 302@@ -118,9 +95,6 @@/integrations/llamacpp /docs/desktop/local-engine/llama-cpp 302/integrations/tensorrt /docs/desktop 302/integrations /docs/desktop 302--/server/* /docs/ 302-/local-server/continue-dev /docs/desktop 302/local-server/data-folder /docs/desktop/data-folder 302/local-server/llama-cpp /docs/desktop/local-engine/llama-cpp 302@@ -128,7 +102,6 @@/local-server/settings /docs/desktop/settings 302/local-server/tabby /docs/desktop 302/local-server/troubleshooting /docs/desktop/troubleshooting 302-/assistants /docs/desktop/assistants 302/platforms /docs/desktop 302/mcp /docs/desktop/mcp 302@@ -136,13 +109,9 @@/windows /docs/desktop/install/windows 302/troubleshooting /docs/desktop/troubleshooting 302/home-server /docs/ 302-/hardware/* /docs/desktop 302-/blog/performance /blog 302/blog/README /blog 302-/changelog/2024-25-04-llama3-command-r-hugginface /changelog/2024-04-25-llama3-command-r-hugginface 302-/docs/desktop/built-in/tensorrt-llm /docs 302/docs/desktop/beta /docs/desktop 302/docs/desktop/docs/data-folder /docs/desktop/data-folder 302@@ -160,10 +129,7 @@/docs/desktop/server-settings /docs/desktop/settings 302/docs/desktop/server-troubleshooting /docs/desktop/troubleshooting 302/docs/desktop/remote-models/cohere /docs/desktop 302-/docs/desktop/mcp-examples/* /docs/desktop/mcp 302/docs/desktop/mcp-examples /docs/desktop/mcp 302-/docs/desktop/server-examples/* /docs/desktop 302-/docs/tools/retrieval /docs/ 302/docs/extensions /docs/ 302/docs/shortcuts /docs/ 302@@ -172,7 +138,6 @@/docs/install-extensions /docs/ 302/docs/UI /docs/ 302/docs/quickstart /docs/ 302-/docs/built-in/llama-cpp /docs/desktop/local-engine/llama-cpp 302/docs/built-in/tensorrt-llm /docs/desktop/local-engine/llama-cpp 302/docs/install-engines /docs/desktop/local-engine/llama-cpp 302@@ -182,7 +147,6 @@/docs/local-inference/llamacpp /docs/desktop/local-engine/llama-cpp 302/docs/local-inference/lmstudio /docs/desktop 302/docs/local-inference/ollama /docs/desktop 302-/docs/local-api /docs/desktop/api-server 302/docs/api-server /docs/desktop/api-server 302/docs/assistants /docs/desktop/assistants 302@@ -194,18 +158,14 @@/docs/settings /docs/desktop/settings 302/docs/mcp /docs/desktop/mcp 302/docs/extensions/mcp /docs/desktop/mcp 302-/docs/threads /changelog/2024-01-16-settings-options-right-panel 302-/docs/docs/data-folder /docs/desktop/data-folder 302/docs/docs/desktop/linux /docs/desktop/install/linux 302/docs/docs/troubleshooting /docs/desktop/troubleshooting 302-/docs/jan-models/jan-nano-32 /docs/desktop/jan-models/jan-nano-32 302/docs/jan-models/jan-nano-128 /docs/desktop/jan-models/jan-nano-128 302/docs/jan-models/jan-v1 /docs/desktop/jan-models/jan-v1 302/docs/jan-models/lucy /docs/desktop/jan-models/lucy 302-/docs/remote-models/generic-openai /docs/desktop/remote-models/openai 302/docs/remote-models/anthropic /docs/desktop/remote-models/anthropic 302/docs/remote-models/azure /docs/desktop/remote-models/azure 302@@ -218,24 +178,19 @@/docs/remote-models/nvidia-nim /docs/desktop 302/docs/remote-models/openai /docs/desktop/remote-models/openai 302/docs/remote-models/openrouter /docs/desktop/remote-models/openrouter 302-/docs/remote-inference/groq /docs/desktop/remote-models/groq 302/docs/remote-inference/mistralai /docs/desktop/remote-models/mistralai 302/docs/remote-inference/openai /docs/desktop/remote-models/openai 302/docs/remote-inference/openrouter /docs/desktop/remote-models/openrouter 302-/docs/inferences/mistralai /docs/desktop/remote-models/mistralai 302/docs/inferences/openai /docs/desktop/remote-models/openai 302-/docs/install/linux /docs/desktop/install/linux 302/docs/install/macos /docs/desktop/install/mac 302/docs/install/windows /docs/desktop/install/windows 302-/docs/desktop-installation /docs/desktop 302/docs/desktop-installation/mac /docs/desktop/install/mac 302/docs/desktop-installation/windows /docs/desktop/install/windows 302/docs/installation/desktop /docs/desktop 302-/docs/privacy-policy /privacy 302/docs/privacy /privacy 302/docs/troubleshooting /docs/desktop/troubleshooting 302@@ -245,10 +200,8 @@/docs/system-requirements /docs/desktop 302/docs/developer/training /docs/ 302/docs/menlo-models/jan-nano /docs/desktop/jan-models/jan-nano-32 302-/docs/server-settings /docs/desktop/settings 302/docs/server /docs/desktop/api-server 302-/docs/mcp-examples/data-analysis/e2b /docs/desktop/mcp 302/docs/mcp-examples/data-analysis/jupyter /docs/desktop/mcp 302/docs/mcp-examples/deepresearch/octagon /docs/desktop/mcp 302@@ -258,17 +211,36 @@/docs/mcp-examples/search/exa /docs/desktop/mcp 302/docs/mcp-examples/search/serper /docs/desktop/mcp 302/docs/mcp-examples/browser/browserbase /docs/desktop/mcp 302-/docs/server-examples/continue-dev /docs/desktop 302/docs/server-examples/llmcord /docs/desktop 302/docs/server-examples/n8n /docs/desktop 302/docs/server-examples/tabby /docs/desktop 302+/guides/server /docs/desktop/api-server 302+/guides/changelog /changelog 302+/guides /docs 302++# Preserve the server alias before /docs/server/* catches the slash form.+/docs/server/ https://docs.jan.ai/desktop/api-server 301++# Stable docs root.+/docs https://docs.jan.ai/ 301+/docs/ https://docs.jan.ai/ 301+# Existing legacy wildcard rules take precedence over the docs hand-off.+/about/* /handbook 302+/download/latest/* /download 302+/install/* /docs/desktop 302+/cortex/* /docs/ 302+/api-reference/* /docs/ 302+/developer/* /docs/ 302+/server/* /docs/ 302+/hardware/* /docs/desktop 302+/docs/desktop/mcp-examples/* /docs/desktop/mcp 302+/docs/desktop/server-examples/* /docs/desktop 302/docs/server-installation/* /docs/ 302/docs/server/* /docs/ 302--/guides/server /docs/desktop/api-server 302-/guides/changelog /changelog 302/guides/changelog/* /changelog/:splat 302-/guides /docs 302/guides/* /docs/:splat 302++# All other docs paths keep their suffix; renamed pages redirect on Stable.+/docs/* https://docs.jan.ai/:splat 301diff --git a/docs/next-sitemap.config.js b/docs/next-sitemap.config.jsindex 6c8fd0c20..a491fd575 100644--- a/docs/next-sitemap.config.js+++ b/docs/next-sitemap.config.js@@ -2,9 +2,14 @@module.exports = {siteUrl: 'https://jan.ai/',generateRobotsTxt: true,+ // postbuild runs after the static export; emit into the uploaded directory,+ // not public/ (which Next already copied before this script runs).+ outDir: './out',changefreq: 'daily',priority: 1.0,// /tokamak is intentionally hidden (kept reachable but unlinked); keep it out// of the sitemap so it isn't surfaced for indexing.- exclude: ['/tokamak'],+ // Documentation now has its own canonical sitemap at docs.jan.ai.+ // Do not advertise old URLs that permanently redirect to the new host.+ exclude: ['/tokamak', '/docs', '/docs/*'],}diff --git a/docs/src/components/DocSearch/index.tsx b/docs/src/components/DocSearch/index.tsxindex 1b23ef241..f6be73e20 100644--- a/docs/src/components/DocSearch/index.tsx+++ b/docs/src/components/DocSearch/index.tsx@@ -1,5 +1,4 @@import { useEffect, useMemo, useRef, useState } from 'react'-import { useRouter } from 'next/router'import { Search as SearchIcon } from 'lucide-react'import { cn } from '@/lib/utils'import {@@ -34,7 +33,6 @@ const DocSearch = ({className,onNavigate,}: DocSearchProps) => {- const router = useRouter()const inputRef = useRef<HTMLInputElement>(null)const containerRef = useRef<HTMLDivElement>(null)@@ -113,7 +111,9 @@ const DocSearch = ({setQuery('')inputRef.current?.blur()onNavigate?.()- router.push(hit.href)+ // Request the document so Pages can redirect legacy docs URLs to Stable.+ // Client routing would load the old exported page bundle and bypass _redirects.+ window.location.assign(hit.href)}const onInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {diff --git a/docs/src/pages/research/jan-code-4b.mdx b/docs/src/pages/research/jan-code-4b.mdxindex 2a4202742..69f582c98 100644--- a/docs/src/pages/research/jan-code-4b.mdx+++ b/docs/src/pages/research/jan-code-4b.mdx@@ -9,7 +9,7 @@ import { Callout } from 'nextra/components'<ResearchPostLayout title="Jan-Code-4B">-Jan-Code-4B is a lightweight, code-tuned 4B parameter model built for fast local inference. Fine-tuned on [Jan-v3-4B-base-instruct](/docs/desktop/jan-models/jan-v3-4b-base-instruct), it is designed for practical coding tasks with an emphasis on handling well-scoped subtasks reliably while keeping latency and compute requirements low.+Jan-Code-4B is a lightweight, code-tuned 4B parameter model built for fast local inference. Fine-tuned on [Jan-v3-4B-base-instruct](https://docs.jan.ai/desktop/jan-models/jan-v3-4b-base-instruct), it is designed for practical coding tasks with an emphasis on handling well-scoped subtasks reliably while keeping latency and compute requirements low.<OpenInJanButton href="jan://models/huggingface/janhq/Jan-code-4b-gguf" />@@ -99,7 +99,7 @@ top_k: 20## Limitations- **Model size**: 4B parameters limit handling of very large codebases or complex architectural decisions in a single context-- **General tasks**: Optimized for coding — for general-purpose tasks, consider [Jan-v3-4B-base-instruct](/docs/desktop/jan-models/jan-v3-4b-base-instruct)+- **General tasks**: Optimized for coding — for general-purpose tasks, consider [Jan-v3-4B-base-instruct](https://docs.jan.ai/desktop/jan-models/jan-v3-4b-base-instruct)## Available Formatsdiff --git a/docs/src/pages/research/jan-v3-4b.mdx b/docs/src/pages/research/jan-v3-4b.mdxindex 697e55110..ff519c20f 100644--- a/docs/src/pages/research/jan-v3-4b.mdx+++ b/docs/src/pages/research/jan-v3-4b.mdx@@ -32,7 +32,7 @@ Jan-v3-4B-base-instruct is a compact 4B parameter model created via post-trainin- **General purpose**: Distillation preserves broad capabilities across standard benchmarks<Callout type="info">- Jan-v3-4B-base-instruct is the base model for [Jan-Code-4B](/docs/desktop/jan-models/jan-code-4b), the code-tuned variant.+ Jan-v3-4B-base-instruct is the base model for [Jan-Code-4B](https://docs.jan.ai/desktop/jan-models/jan-code-4b), the code-tuned variant.</Callout>## Performance@@ -109,7 +109,7 @@ top_k: 20## Limitations- **Model size**: 4B parameters limit complex multi-step reasoning compared to larger models-- **Specialized domains**: For coding specifically, consider [Jan-Code-4B](/docs/desktop/jan-models/jan-code-4b)+- **Specialized domains**: For coding specifically, consider [Jan-Code-4B](https://docs.jan.ai/desktop/jan-models/jan-code-4b)## Available Formats