File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,12 @@ let loader: ReactRouter.Loader.t<loaderData> = async ({request}) => {
189189 // TODO POST RR7: extract this out into a separate function
190190 // it can probably be cached or something
191191 let fileContents = await (await allMdx ())
192- -> Array .filter (mdx => mdx .path -> Option .map (String .includes (_ , pathname ))-> Option .getOr (false ))
192+ -> Array .filter (mdx => {
193+ switch mdx .slug {
194+ | Some (slug ) => pathname -> Util .String .camelCase -> String .includes (slug -> Util .String .camelCase )
195+ | None => false
196+ }
197+ })
193198 -> Array .get (0 )
194199 -> Option .flatMap (mdx => {
195200 filePath :=
@@ -298,7 +303,7 @@ let default = () => {
298303 <Meta title = title description = {attributes .description -> Nullable .getOr ("" )} />
299304 <DocsLayout
300305 categories
301- activeToc = {title : "Introduction" , entries }
306+ activeToc = {title , entries }
302307 breadcrumbs = ?{loaderData .breadcrumbs -> Option .map (crumbs =>
303308 List .mapWithIndex (crumbs , (item , index ) => {
304309 if index === 0 {
Original file line number Diff line number Diff line change 1717 "build" : " patch-package && rescript build && react-router build" ,
1818 "test" : " node scripts/test-examples.mjs && node scripts/test-hrefs.mjs" ,
1919 "reanalyze" : " reanalyze -all-cmt ." ,
20- "update-index" : " npm run generate-llms && && node scripts/generate_feed.mjs > public/blog/feed.xml" ,
20+ "update-index" : " npm run generate-llms && node scripts/generate_feed.mjs > public/blog/feed.xml" ,
2121 "sync-bundles" : " node scripts/sync-playground-bundles.mjs" ,
2222 "generate-llms" : " node scripts/generate_llms.mjs" ,
2323 "format" : " prettier . --write --experimental-cli && rescript format" ,
8383 "vite-plugin-devtools-json" : " ^1.0.0" ,
8484 "vite-plugin-env-compatible" : " ^2.0.1"
8585 }
86- }
86+ }
You can’t perform that action at this time.
0 commit comments