From b60c076364dde9bb8f0fe95c01a41ff716d88559 Mon Sep 17 00:00:00 2001 From: Nitish Mahipal Surana Date: Wed, 29 Oct 2025 12:11:55 -0700 Subject: [PATCH] VAP10-28: Adding reo.dev on docs --- fern/custom.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/fern/custom.js b/fern/custom.js index 440e512dc..d26dbc4c3 100644 --- a/fern/custom.js +++ b/fern/custom.js @@ -6,6 +6,7 @@ const WIDGET_SCRIPT_URL = isLocalhost : 'https://docs-widget.vercel.app/widget.js'; const HOCKEYSTACK_API_KEY = '96e358f635f3f5ea7fda26023b10da'; +const REO_CLIENT_ID = '0dc28e3fda800b9'; function injectVapiWidget() { console.log('[custom.js] injectVapiWidget called'); @@ -51,8 +52,27 @@ function initializeHockeyStack() { document.getElementsByTagName('head')[0].append(hsscript); } +function initializeReo() { + if (isLocalhost) { + console.log('[custom.js] Skipping Reo on localhost'); + return; + } + + var reoScript = document.createElement("script"); + reoScript.type = "text/javascript"; + reoScript.src = "https://static.reo.dev/" + REO_CLIENT_ID + "/reo.js"; + reoScript.defer = true; + reoScript.onload = function() { + if (typeof Reo !== 'undefined') { + Reo.init({ clientID: REO_CLIENT_ID }); + } + }; + document.head.appendChild(reoScript); +} + function initializeAll() { initializeHockeyStack(); + initializeReo(); if (ENABLE_VOICE_WIDGET) { injectVapiWidget(); }