diff --git a/app/routes/MdxRoute.res b/app/routes/MdxRoute.res index 489734af6..3f3eebbe8 100644 --- a/app/routes/MdxRoute.res +++ b/app/routes/MdxRoute.res @@ -200,9 +200,10 @@ let loader: ReactRouter.Loader.t = async ({request}) => { ->Array.get(0) ->Option.flatMap(mdx => { filePath := - mdx.path->Option.map(mdxPath => - String.slice(mdxPath, ~start=mdxPath->String.indexOf("rescript-lang.org/") + 17) - ) + mdx.path->Option.map(mdxPath => { + Console.log2("mdxPath:", mdxPath) + String.slice(mdxPath, ~start=mdxPath->String.indexOf("/markdown-pages")) + }) // remove the filesystem path to get the relative path to the files in the repo mdx.path }) @@ -289,6 +290,8 @@ let default = () => { let {entries, categories, title} = loaderData + Console.log(loaderData) + <> {if (pathname :> string) == "/docs/manual/api" { <>