//
{React.string("Docs")}
diff --git a/app/routes/MdxRoute.res b/app/routes/MdxRoute.res
index c3b495b7c..55f1bf4fb 100644
--- a/app/routes/MdxRoute.res
+++ b/app/routes/MdxRoute.res
@@ -291,8 +291,43 @@ let default = () => {
<>
{if (pathname :> string) == "/docs/manual/api" {
+ let breadcrumbs = list{
+ {Url.name: "Docs", href: `/docs/manual/api`},
+ {name: "API", href: `/docs/manual/api`},
+ }
+ let sidebarContent =
+
+
<>
Nullable.getOr("ReScript API")} />
+
+
+
+
{component()}
@@ -304,10 +339,9 @@ let default = () => {
) {
<>
Nullable.getOr("")} />
-
Option.map(crumbs =>
+
+ {
+ let breadcrumbs = loaderData.breadcrumbs->Option.map(crumbs =>
List.mapWithIndex(crumbs, (item, index) => {
if index === 0 {
if (pathname :> string)->String.includes("docs/manual") {
@@ -321,11 +355,64 @@ let default = () => {
item
}
})
- )}
- editHref={`https://github.com/rescript-lang/rescript-lang.org/blob/master${loaderData.filePath->Option.getOrThrow}`}
- >
- {component()}
-
+ )
+ let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master${loaderData.filePath->Option.getOrThrow}`
+
+ let sidebarContent =
+
+
+ <>
+
+ {breadcrumbs->Option.mapOr(React.null, crumbs =>
+
+ )}
+
+ {React.string("Edit")}
+
+
+
+ {component()}
+
+ >
+ }
>
} else if (pathname :> string)->String.includes("community") {
@@ -347,7 +434,7 @@ let default = () => {
->Option.getOr("Syntax Lookup | ReScript API")}
description={attributes.description->Nullable.getOr("")}
/>
-
+
{component()}
diff --git a/app/routes/SyntaxLookupRoute.res b/app/routes/SyntaxLookupRoute.res
index ff71bc73a..b2a0e8e25 100644
--- a/app/routes/SyntaxLookupRoute.res
+++ b/app/routes/SyntaxLookupRoute.res
@@ -34,6 +34,7 @@ let default = () => {
let {mdxSources} = useLoaderData()
<>
{React.string("Syntax Lookup | ReScript API")}
+
>
}
diff --git a/functions/ogimage/[[path]]/index.png.res b/functions/ogimage/[[path]]/index.png.res
index bdc524e7b..0b215994f 100644
--- a/functions/ogimage/[[path]]/index.png.res
+++ b/functions/ogimage/[[path]]/index.png.res
@@ -16,8 +16,6 @@ let loadGoogleFont = async (family: string) => {
type context = {request: FetchAPI.request, params: {path: array}}
let onRequest = async ({params}: context) => {
- Console.log(params.path)
-
let title = params.path[0]->Option.getOr("ReScript")->decodeURIComponent
// let url = WebAPI.URL.make(~url=request.url)
// let title = url.searchParams->URLSearchParams.get("title")
diff --git a/package.json b/package.json
index 39407f269..34f375558 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"build:vite": "react-router build",
"build": "yarn build:res && yarn build:scripts && yarn build:update-index && yarn build:vite",
"ci:format": "prettier . --check --experimental-cli",
- "ci:test": "yarn vitest --run --browser.headless",
+ "ci:test": "yarn vitest --run --browser.headless --update",
"clean:res": "rescript clean",
"convert-images": "auto-convert-images",
"dev:res": "rescript watch",
diff --git a/src/ApiDocs.res b/src/ApiDocs.res
index f718abca3..20817bd4f 100644
--- a/src/ApiDocs.res
+++ b/src/ApiDocs.res
@@ -95,7 +95,7 @@ module RightSidebar = {
module SidebarTree = {
@react.component
- let make = (~isOpen: bool, ~toggle: unit => unit, ~node: node, ~items: array- ) => {
+ let make = (~node: node, ~items: array
- ) => {
open ReactRouter
let location = useLocation()
@@ -115,7 +115,7 @@ module SidebarTree = {
| true =>
| false => React.null
@@ -176,54 +176,26 @@ module SidebarTree = {
}
}
- let preludeSection =
-
-
-
-
-