Skip to content

Commit c39224a

Browse files
fix: resolve ssr:false prerender error for docs/manual/api route (#1242)
* Initial plan * fix: filter docs/manual/api from mdxRoutes and add ApiOverviewRoute.resi Agent-Logs-Url: https://github.com/rescript-lang/rescript-lang.org/sessions/b7d1655e-a3e7-4c73-b113-ec2b9fdc0ce3 Co-authored-by: jderochervlk <60623931+jderochervlk@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jderochervlk <60623931+jderochervlk@users.noreply.github.com>
1 parent e877771 commit c39224a

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

app/routes.res

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ let mdxRoutes = mdxRoutes("./routes/MdxRoute.jsx")->Array.filter(r =>
4545
path === "blog" ||
4646
String.startsWith(path, "blog/") ||
4747
path === "community" ||
48-
String.startsWith(path, "community/")
48+
String.startsWith(path, "community/") ||
49+
path === "docs/manual/api"
4950
)
5051
->Option.getOr(false)
5152
)

app/routes/ApiOverviewRoute.resi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
type loaderData = {
2+
compiledMdx: CompiledMdx.t,
3+
title: string,
4+
description: string,
5+
}
6+
7+
let loader: ReactRouter.Loader.t<loaderData>
8+
9+
let default: unit => React.element

0 commit comments

Comments
 (0)