@@ -99,22 +99,6 @@ let manualTableOfContents = async () => {
9999 categories
100100}
101101
102- let reactTableOfContents = async () => {
103- let groups =
104- (await allMdx (~filterByPaths = ["markdown-pages/docs" ]))
105- -> filterMdxPages ("docs/react" )
106- -> groupBySection
107- -> Dict .mapValues (values => values -> sortSection -> convertToNavItems ("/docs/react" ))
108-
109- // these are the categories that appear in the sidebar
110- let categories : array <SidebarLayout .Sidebar .Category .t > = getAllGroups (
111- groups ,
112- ["Overview" , "Main Concepts" , "Hooks & State Management" , "Guides" ],
113- )
114-
115- categories
116- }
117-
118102let communityTableOfContents = async () => {
119103 let groups =
120104 (await allMdx (~filterByPaths = ["markdown-pages/community" ]))
@@ -163,8 +147,6 @@ let loader: ReactRouter.Loader.t<loaderData> = async ({request}) => {
163147 []
164148 } else if pathname -> String .includes ("docs/manual" ) {
165149 await manualTableOfContents ()
166- } else if pathname -> String .includes ("docs/react" ) {
167- await reactTableOfContents ()
168150 } else if pathname -> String .includes ("community" ) {
169151 await communityTableOfContents ()
170152 } else {
@@ -222,21 +204,11 @@ let loader: ReactRouter.Loader.t<loaderData> = async ({request}) => {
222204 href : "/docs/manual/" ++ "introduction" ,
223205 },
224206 })
225- : pathname -> String .includes ("docs/react" )
226- ? Some (list {
227- {Url .name : "Docs" , href : "/docs/" },
228- {
229- Url .name : "rescript-react" ,
230- href : "/docs/react/" ++ "introduction" ,
231- },
232- })
233207 : None
234208
235209 let metaTitleCategory = {
236210 let path = (pathname :> string )
237- let title = if path -> String .includes ("docs/react" ) {
238- "ReScript React"
239- } else if path -> String .includes ("docs/manual/api" ) {
211+ let title = if path -> String .includes ("docs/manual/api" ) {
240212 "ReScript API"
241213 } else if path -> String .includes ("docs/manual" ) {
242214 "ReScript Language Manual"
@@ -322,7 +294,8 @@ let default = () => {
322294 </>
323295 } else if (
324296 (pathname :> string )-> String .includes ("docs/manual" ) ||
325- (pathname :> string )-> String .includes ("docs/react" )
297+ (pathname :> string )-> String .includes ("docs/react" ) ||
298+ (pathname :> string )-> String .includes ("docs/guidelines" )
326299 ) {
327300 <>
328301 <Meta title = title description = {attributes .description -> Nullable .getOr ("" )} />
@@ -333,8 +306,6 @@ let default = () => {
333306 if index === 0 {
334307 if (pathname :> string )-> String .includes ("docs/manual" ) {
335308 {... item , href : "/docs/manual/introduction" }
336- } else if (pathname :> string )-> String .includes ("docs/react" ) {
337- {... item , href : "/docs/react/introduction" }
338309 } else {
339310 item
340311 }
0 commit comments