|
129 | 129 | "how-tos/human_in_the_loop/edit-graph-state.ipynb": "https://docs.langchain.com/oss/python/langgraph/use-time-travel", |
130 | 130 |
|
131 | 131 | # LGP mintlify migration redirects |
| 132 | + "examples/index.md": "https://docs.langchain.com/oss/python/learn", |
| 133 | + "guides/index.md": "https://docs.langchain.com/oss/python/langgraph/overview", |
| 134 | + "concepts/index.md": "https://docs.langchain.com/oss/python/langgraph/overview", |
| 135 | + "tutorials/index.md": "https://docs.langchain.com/oss/python/learn", |
| 136 | + "llms-txt-overview.md": "https://docs.langchain.com/llms.txt", |
| 137 | + "tutorials/rag/langgraph_adaptive_rag.md": "https://docs.langchain.com/oss/python/langgraph/agentic-rag", |
| 138 | + "tutorials/multi_agent/multi-agent-collaboration.ipynb": "https://docs.langchain.com/oss/python/langchain/multi-agent", |
| 139 | + "how-tos/create-react-agent-manage-message-history.ipynb": "https://docs.langchain.com/oss/python/langgraph/add-memory", |
| 140 | + "how-tos/many-tools.ipynb": "https://docs.langchain.com/oss/python/langchain/tools", |
| 141 | + "tutorials/customer-support/customer-support.ipynb": "https://docs.langchain.com/oss/python/langgraph/agentic-rag", |
| 142 | + "how-tos/react-agent-structured-output.ipynb": "https://docs.langchain.com/oss/python/langchain/agents#structured-output", |
| 143 | + "tutorials/code_assistant/langgraph_code_assistant.ipynb": "https://docs.langchain.com/oss/python/langgraph/agentic-rag", |
| 144 | + "tutorials/multi_agent/hierarchical_agent_teams.ipynb": "https://docs.langchain.com/oss/python/langchain/supervisor", |
132 | 145 | "tutorials/auth/getting_started.md": "https://docs.langchain.com/langsmith/auth", |
133 | 146 | "tutorials/auth/resource_auth.md": "https://docs.langchain.com/langsmith/resource-auth", |
134 | 147 | "tutorials/auth/add_auth_server.md": "https://docs.langchain.com/langsmith/add-auth-server", |
135 | 148 | "how-tos/use-remote-graph.md": "https://docs.langchain.com/langsmith/use-remote-graph", |
136 | 149 | "how-tos/autogen-integration.md": "https://docs.langchain.com/langsmith/autogen-integration", |
| 150 | + "how-tos/human_in_the_loop/wait-user-input.ipynb": "https://docs.langchain.com/oss/python/langgraph/interrupts", |
137 | 151 | "cloud/how-tos/use_stream_react.md": "https://docs.langchain.com/langsmith/use-stream-react", |
138 | 152 | "cloud/how-tos/generative_ui_react.md": "https://docs.langchain.com/langsmith/generative-ui-react", |
139 | 153 | "concepts/langgraph_platform.md": "https://docs.langchain.com/langsmith/deployments", |
|
219 | 233 | "tutorials/get-started/6-time-travel.md": "https://docs.langchain.com/oss/python/langgraph/quickstart", |
220 | 234 | "tutorials/langsmith/local-server.md": "https://docs.langchain.com/oss/python/langgraph/local-server", |
221 | 235 | "tutorials/workflows.md": "https://docs.langchain.com/oss/python/langgraph/workflows-agents", |
| 236 | + "tutorials/plan-and-execute/plan-and-execute.ipynb": "https://docs.langchain.com/oss/python/langchain/middleware/built-in#to-do-list", |
| 237 | + "tutorials/langgraph-platform/local-server/local-server.md": "https://docs.langchain.com/langsmith/local-server", |
222 | 238 | "concepts/agentic_concepts.md": "https://docs.langchain.com/oss/python/langgraph/workflows-agents", |
223 | 239 | "guides/index.md": "https://docs.langchain.com/oss/python/langchain/overview", |
224 | 240 | "agents/overview.md": "https://docs.langchain.com/oss/python/langchain/agents", |
225 | 241 | "agents/run_agents.md": "https://docs.langchain.com/oss/python/langgraph/quickstart", |
226 | 242 | "concepts/low_level.md": "https://docs.langchain.com/oss/python/langgraph/graph-api", |
227 | 243 | "how-tos/graph-api.md": "https://docs.langchain.com/oss/python/langgraph/graph-api", |
| 244 | + "how-tos/react-agent-from-scratch.ipynb": "https://docs.langchain.com/oss/python/langchain/quickstart", |
228 | 245 | "concepts/functional_api.md": "https://docs.langchain.com/oss/python/langgraph/functional-api", |
229 | 246 | "how-tos/use-functional-api.md": "https://docs.langchain.com/oss/python/langgraph/functional-api", |
230 | 247 | "concepts/pregel.md": "https://docs.langchain.com/oss/python/langgraph/pregel", |
@@ -793,6 +810,17 @@ def on_post_build(config): |
793 | 810 | # Track which paths have explicit redirects |
794 | 811 | redirected_paths = set() |
795 | 812 |
|
| 813 | + # Collect all existing HTML files in the site |
| 814 | + all_html_files = set() |
| 815 | + for root, dirs, files in os.walk(site_dir): |
| 816 | + for file in files: |
| 817 | + if file.endswith(".html"): |
| 818 | + # Get relative path from site_dir |
| 819 | + html_path = os.path.relpath(os.path.join(root, file), site_dir) |
| 820 | + # Normalize path separators to forward slashes |
| 821 | + html_path = html_path.replace(os.sep, "/") |
| 822 | + all_html_files.add(html_path) |
| 823 | + |
796 | 824 | # Process explicit redirects from REDIRECT_MAP |
797 | 825 | for page_old, page_new in REDIRECT_MAP.items(): |
798 | 826 | # Convert .ipynb to .md for path calculation |
@@ -847,6 +875,24 @@ def on_post_build(config): |
847 | 875 |
|
848 | 876 | _write_html(site_dir, old_html_path, new_html_path) |
849 | 877 |
|
| 878 | + # Create catch-all redirects for any HTML files not explicitly redirected |
| 879 | + catchall_url = "https://docs.langchain.com/oss/python/langgraph/overview" |
| 880 | + for html_file in all_html_files: |
| 881 | + # Skip if this file is already explicitly redirected |
| 882 | + if html_file in redirected_paths: |
| 883 | + continue |
| 884 | + |
| 885 | + # Skip the root index.html (we handle that separately) |
| 886 | + if html_file == "index.html": |
| 887 | + continue |
| 888 | + |
| 889 | + # Skip reference documentation (keep those accessible) |
| 890 | + if html_file.startswith("reference/"): |
| 891 | + continue |
| 892 | + |
| 893 | + # Create redirect for this unmapped file |
| 894 | + _write_html(site_dir, html_file, catchall_url) |
| 895 | + |
850 | 896 | # Create root index.html redirect |
851 | 897 | root_redirect_html = """<!doctype html> |
852 | 898 | <html lang="en"> |
|
0 commit comments