From 60413596a158e8873501af697008892853fca631 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 28 Mar 2026 00:53:30 +0000 Subject: [PATCH 1/4] Add 8 new redirects for moved/renamed doc pages Co-Authored-By: Lee Vaughn --- fern/docs.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/fern/docs.yml b/fern/docs.yml index 50bfdcae..eb340791 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -2070,3 +2070,21 @@ redirects: destination: /docs/streaming/guides/evaluate_streaming_wer - source: /docs/guides/turn_detection_improvement_using_async destination: /docs/streaming/guides/turn_detection_improvement_using_async + + # New redirects for .md and moved pages + - source: /docs/migration-guides/universal-to-u3-pro-streaming.md + destination: /docs/streaming/migration-guides/universal-to-u3-pro-streaming + - source: /docs/concurrency + destination: /docs/pre-recorded-audio/concurrency + - source: /docs/migration-guides/gladia_to_aai.md + destination: /docs/streaming/migration-guides/gladia-to-aai-streaming + - source: /docs/voice-agents/u3-pro-partials + destination: /docs/streaming/universal-3-pro/turn-detection-and-partials + - source: /docs/migration-guides/speechmatics_to_aai_streaming.md + destination: /docs/streaming/migration-guides/speechmatics_to_aai_streaming + - source: /docs/guides/apply-llms-to-audio-files + destination: /docs/llm-gateway/apply-llms-to-audio-files + - source: /docs/language-detection.md + destination: /docs/pre-recorded-audio/language-detection + - source: /docs/pipecat-intro-guide.md + destination: /docs/voice-agents/u3pro-pipecat From 462008bbbc6e69fa30237b57f8b57afdcb7e0c1a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:36:05 +0000 Subject: [PATCH 2/4] Handle .md redirects via JS script instead of docs.yml redirects Fern intercepts .md URLs for its markdown-serving feature, so redirect entries with .md sources don't work. Move .md redirects to a client-side JS script and keep non-.md redirects in docs.yml. Co-Authored-By: Lee Vaughn --- fern/docs.yml | 16 +++++----------- fern/scripts/md-redirect.js | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 fern/scripts/md-redirect.js diff --git a/fern/docs.yml b/fern/docs.yml index eb340791..5b798777 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -10,6 +10,8 @@ js: strategy: beforeInteractive - path: ./scripts/universal-3-pro-redirect.js strategy: beforeInteractive + - path: ./scripts/md-redirect.js + strategy: beforeInteractive - path: ./scripts/scroll-highlighted-lines.js strategy: afterInteractive - path: ./scripts/inject-legal-footer.js @@ -2071,20 +2073,12 @@ redirects: - source: /docs/guides/turn_detection_improvement_using_async destination: /docs/streaming/guides/turn_detection_improvement_using_async - # New redirects for .md and moved pages - - source: /docs/migration-guides/universal-to-u3-pro-streaming.md - destination: /docs/streaming/migration-guides/universal-to-u3-pro-streaming + # New redirects for moved pages - source: /docs/concurrency destination: /docs/pre-recorded-audio/concurrency - - source: /docs/migration-guides/gladia_to_aai.md - destination: /docs/streaming/migration-guides/gladia-to-aai-streaming - source: /docs/voice-agents/u3-pro-partials destination: /docs/streaming/universal-3-pro/turn-detection-and-partials - - source: /docs/migration-guides/speechmatics_to_aai_streaming.md - destination: /docs/streaming/migration-guides/speechmatics_to_aai_streaming - source: /docs/guides/apply-llms-to-audio-files destination: /docs/llm-gateway/apply-llms-to-audio-files - - source: /docs/language-detection.md - destination: /docs/pre-recorded-audio/language-detection - - source: /docs/pipecat-intro-guide.md - destination: /docs/voice-agents/u3pro-pipecat + # .md suffix redirects are handled by md-redirect.js because + # Fern intercepts .md URLs for its markdown-serving feature. diff --git a/fern/scripts/md-redirect.js b/fern/scripts/md-redirect.js new file mode 100644 index 00000000..1967f1bf --- /dev/null +++ b/fern/scripts/md-redirect.js @@ -0,0 +1,25 @@ +// Redirect URLs ending in .md to their correct destinations. +// Fern intercepts .md suffixes for its markdown-serving feature, +// so these cannot be handled via the redirects config in docs.yml. +(function () { + var path = window.location.pathname; + if (!path.endsWith(".md")) return; + + var redirects = { + "/docs/migration-guides/universal-to-u3-pro-streaming.md": + "/docs/streaming/migration-guides/universal-to-u3-pro-streaming", + "/docs/migration-guides/gladia_to_aai.md": + "/docs/streaming/migration-guides/gladia-to-aai-streaming", + "/docs/migration-guides/speechmatics_to_aai_streaming.md": + "/docs/streaming/migration-guides/speechmatics_to_aai_streaming", + "/docs/language-detection.md": + "/docs/pre-recorded-audio/language-detection", + "/docs/pipecat-intro-guide.md": + "/docs/voice-agents/u3pro-pipecat", + }; + + var dest = redirects[path]; + if (dest) { + window.location.replace(dest); + } +})(); From d0cf27578bcfc090f2123836558527e94497866b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:37:13 +0000 Subject: [PATCH 3/4] Fix prettier formatting in md-redirect.js Co-Authored-By: Lee Vaughn --- fern/scripts/md-redirect.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fern/scripts/md-redirect.js b/fern/scripts/md-redirect.js index 1967f1bf..87d6a077 100644 --- a/fern/scripts/md-redirect.js +++ b/fern/scripts/md-redirect.js @@ -14,8 +14,7 @@ "/docs/streaming/migration-guides/speechmatics_to_aai_streaming", "/docs/language-detection.md": "/docs/pre-recorded-audio/language-detection", - "/docs/pipecat-intro-guide.md": - "/docs/voice-agents/u3pro-pipecat", + "/docs/pipecat-intro-guide.md": "/docs/voice-agents/u3pro-pipecat", }; var dest = redirects[path]; From b186a6afe72eb3f8a4f112d21933bfa03da7d8b8 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:41:58 +0000 Subject: [PATCH 4/4] Remove ineffective md-redirect.js - Fern handles .md URLs server-side Fern processes .md URLs server-side before any client-side JS executes, so the JS redirect approach cannot intercept them. Removed the script and its registration. The 3 non-.md redirects remain and work correctly. Co-Authored-By: Lee Vaughn --- fern/docs.yml | 4 ---- fern/scripts/md-redirect.js | 24 ------------------------ 2 files changed, 28 deletions(-) delete mode 100644 fern/scripts/md-redirect.js diff --git a/fern/docs.yml b/fern/docs.yml index 5b798777..243c6868 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -10,8 +10,6 @@ js: strategy: beforeInteractive - path: ./scripts/universal-3-pro-redirect.js strategy: beforeInteractive - - path: ./scripts/md-redirect.js - strategy: beforeInteractive - path: ./scripts/scroll-highlighted-lines.js strategy: afterInteractive - path: ./scripts/inject-legal-footer.js @@ -2080,5 +2078,3 @@ redirects: destination: /docs/streaming/universal-3-pro/turn-detection-and-partials - source: /docs/guides/apply-llms-to-audio-files destination: /docs/llm-gateway/apply-llms-to-audio-files - # .md suffix redirects are handled by md-redirect.js because - # Fern intercepts .md URLs for its markdown-serving feature. diff --git a/fern/scripts/md-redirect.js b/fern/scripts/md-redirect.js deleted file mode 100644 index 87d6a077..00000000 --- a/fern/scripts/md-redirect.js +++ /dev/null @@ -1,24 +0,0 @@ -// Redirect URLs ending in .md to their correct destinations. -// Fern intercepts .md suffixes for its markdown-serving feature, -// so these cannot be handled via the redirects config in docs.yml. -(function () { - var path = window.location.pathname; - if (!path.endsWith(".md")) return; - - var redirects = { - "/docs/migration-guides/universal-to-u3-pro-streaming.md": - "/docs/streaming/migration-guides/universal-to-u3-pro-streaming", - "/docs/migration-guides/gladia_to_aai.md": - "/docs/streaming/migration-guides/gladia-to-aai-streaming", - "/docs/migration-guides/speechmatics_to_aai_streaming.md": - "/docs/streaming/migration-guides/speechmatics_to_aai_streaming", - "/docs/language-detection.md": - "/docs/pre-recorded-audio/language-detection", - "/docs/pipecat-intro-guide.md": "/docs/voice-agents/u3pro-pipecat", - }; - - var dest = redirects[path]; - if (dest) { - window.location.replace(dest); - } -})();