@@ -56,93 +56,106 @@ let make = (props: props): React.element => {
5656 // docs routes
5757 | {base : ["docs" , "manual" ], pagepath , version } =>
5858 // check if it's an api route
59- switch Belt .Array .get (pagepath , 0 ) {
60- | Some ("api" ) =>
61- switch version {
62- | Latest =>
63- switch (Belt .Array .length (pagepath ), Belt .Array .get (pagepath , 1 )) {
64- | (1 , _ ) => <ApiOverviewLayout .Docs > content </ApiOverviewLayout .Docs >
59+ <EnableCollapsibleNavbar >
60+ {switch Belt .Array .get (pagepath , 0 ) {
61+ | Some ("api" ) =>
62+ switch version {
63+ | Latest =>
64+ switch (Belt .Array .length (pagepath ), Belt .Array .get (pagepath , 1 )) {
65+ | (1 , _ ) => <ApiOverviewLayout .Docs > content </ApiOverviewLayout .Docs >
66+ | _ => content
67+ }
68+ | Version ("v8.0.0" ) =>
69+ switch (Belt .Array .length (pagepath ), Belt .Array .get (pagepath , 1 )) {
70+ | (1 , _ ) => <ApiOverviewLayout8_0_0 .Docs > content </ApiOverviewLayout8_0_0 .Docs >
71+ | (2 , Some ("js" )) => <JsDocsLayout8_0_0 .Prose > content </JsDocsLayout8_0_0 .Prose >
72+ | (2 , Some ("belt" )) => <BeltDocsLayout8_0_0 .Prose > content </BeltDocsLayout8_0_0 .Prose >
73+ | (_ , Some ("js" )) => <JsDocsLayout8_0_0 .Docs > content </JsDocsLayout8_0_0 .Docs >
74+ | (_ , Some ("belt" )) => <BeltDocsLayout8_0_0 .Docs > content </BeltDocsLayout8_0_0 .Docs >
75+ | (_ , Some ("dom" )) => <DomDocsLayout8_0_0 .Docs > content </DomDocsLayout8_0_0 .Docs >
76+ | _ => React .null
77+ }
78+ | Version ("v9.0.0" ) =>
79+ switch (Belt .Array .length (pagepath ), Belt .Array .get (pagepath , 1 )) {
80+ | (1 , _ ) => <ApiOverviewLayout9_0_0 .Docs > content </ApiOverviewLayout9_0_0 .Docs >
81+ | (2 , Some ("js" )) => <JsDocsLayout9_0_0 .Prose > content </JsDocsLayout9_0_0 .Prose >
82+ | (2 , Some ("belt" )) => <BeltDocsLayout9_0_0 .Prose > content </BeltDocsLayout9_0_0 .Prose >
83+ | (_ , Some ("js" )) => <JsDocsLayout9_0_0 .Docs > content </JsDocsLayout9_0_0 .Docs >
84+ | (_ , Some ("belt" )) => <BeltDocsLayout9_0_0 .Docs > content </BeltDocsLayout9_0_0 .Docs >
85+ | (_ , Some ("dom" )) => <DomDocsLayout9_0_0 .Docs > content </DomDocsLayout9_0_0 .Docs >
86+ | _ => React .null
87+ }
88+ | Version ("v10.0.0" ) =>
89+ switch (Belt .Array .length (pagepath ), Belt .Array .get (pagepath , 1 )) {
90+ | (1 , _ ) => <ApiOverviewLayout10_0_0 .Docs > content </ApiOverviewLayout10_0_0 .Docs >
91+ | (2 , Some ("js" )) => <JsDocsLayout10_0_0 .Prose > content </JsDocsLayout10_0_0 .Prose >
92+ | (2 , Some ("belt" )) => <BeltDocsLayout10_0_0 .Prose > content </BeltDocsLayout10_0_0 .Prose >
93+ | (_ , Some ("js" )) => <JsDocsLayout10_0_0 .Docs > content </JsDocsLayout10_0_0 .Docs >
94+ | (_ , Some ("belt" )) => <BeltDocsLayout10_0_0 .Docs > content </BeltDocsLayout10_0_0 .Docs >
95+ | (_ , Some ("dom" )) => <DomDocsLayout10_0_0 .Docs > content </DomDocsLayout10_0_0 .Docs >
96+ | _ => React .null
97+ }
6598 | _ => content
6699 }
67- | Version ( "v8.0.0" ) =>
68- switch ( Belt . Array . length ( pagepath ), Belt . Array . get ( pagepath , 1 )) {
69- | ( 1 , _ ) => < ApiOverviewLayout8_0_0 . Docs > content </ ApiOverviewLayout8_0_0 . Docs >
70- | ( 2 , Some ( "js" )) => < JsDocsLayout8_0_0 . Prose > content </ JsDocsLayout8_0_0 . Prose >
71- | ( 2 , Some ( "belt" )) => < BeltDocsLayout8_0_0 . Prose > content </ BeltDocsLayout8_0_0 . Prose >
72- | ( _ , Some ( "js" )) => < JsDocsLayout8_0_0 . Docs > content </ JsDocsLayout8_0_0 . Docs >
73- | ( _ , Some ( "belt" )) => < BeltDocsLayout8_0_0 . Docs > content </ BeltDocsLayout8_0_0 . Docs >
74- | ( _ , Some ( "dom" )) => < DomDocsLayout8_0_0 . Docs > content </ DomDocsLayout8_0_0 . Docs >
75- | _ => React . null
76- }
77- | Version ("v9.0.0" ) =>
78- switch ( Belt . Array . length ( pagepath ), Belt . Array . get ( pagepath , 1 )) {
79- | ( 1 , _ ) => < ApiOverviewLayout9_0_0 . Docs > content </ ApiOverviewLayout9_0_0 . Docs >
80- | ( 2 , Some ( "js" )) => < JsDocsLayout9_0_0 . Prose > content </ JsDocsLayout9_0_0 . Prose >
81- | ( 2 , Some ( "belt" )) => < BeltDocsLayout9_0_0 . Prose > content </ BeltDocsLayout9_0_0 . Prose >
82- | ( _ , Some ( "js" )) => < JsDocsLayout9_0_0 . Docs > content </ JsDocsLayout9_0_0 . Docs >
83- | ( _ , Some ( "belt" )) => < BeltDocsLayout9_0_0 . Docs > content </ BeltDocsLayout9_0_0 . Docs >
84- | ( _ , Some ( "dom" )) => < DomDocsLayout9_0_0 . Docs > content </ DomDocsLayout9_0_0 . Docs >
100+ | _ =>
101+ switch version {
102+ | Latest = >
103+ < ManualDocsLayout . Latest frontmatter = { component -> frontmatter } >
104+ content
105+ </ ManualDocsLayout . Latest >
106+ | Version ( "v8.0.0" ) = >
107+ < ManualDocsLayout . V800 frontmatter = { component -> frontmatter } >
108+ content
109+ </ ManualDocsLayout . V800 >
110+ | Version ("v9.0.0" ) =>
111+ < ManualDocsLayout . V900 frontmatter = { component -> frontmatter }>
112+ content
113+ </ ManualDocsLayout . V900 >
114+ | Version ( "v10.0.0" ) = >
115+ < ManualDocsLayout . V1000 frontmatter = { component -> frontmatter } >
116+ content
117+ </ ManualDocsLayout . V1000 >
85118 | _ => React .null
86119 }
87- | Version ("v10.0.0" ) =>
88- switch (Belt .Array .length (pagepath ), Belt .Array .get (pagepath , 1 )) {
89- | (1 , _ ) => <ApiOverviewLayout10_0_0 .Docs > content </ApiOverviewLayout10_0_0 .Docs >
90- | (2 , Some ("js" )) => <JsDocsLayout10_0_0 .Prose > content </JsDocsLayout10_0_0 .Prose >
91- | (2 , Some ("belt" )) => <BeltDocsLayout10_0_0 .Prose > content </BeltDocsLayout10_0_0 .Prose >
92- | (_ , Some ("js" )) => <JsDocsLayout10_0_0 .Docs > content </JsDocsLayout10_0_0 .Docs >
93- | (_ , Some ("belt" )) => <BeltDocsLayout10_0_0 .Docs > content </BeltDocsLayout10_0_0 .Docs >
94- | (_ , Some ("dom" )) => <DomDocsLayout10_0_0 .Docs > content </DomDocsLayout10_0_0 .Docs >
95- | _ => React .null
96- }
97- | _ => content
98- }
99- | _ =>
100- switch version {
120+ }}
121+ </EnableCollapsibleNavbar >
122+ | {base : ["docs" , "react" ], version } =>
123+ <EnableCollapsibleNavbar >
124+ {switch version {
101125 | Latest =>
102- <ManualDocsLayout .Latest frontmatter = {component -> frontmatter }>
103- content
104- </ManualDocsLayout .Latest >
105- | Version ("v8.0.0" ) =>
106- <ManualDocsLayout .V800 frontmatter = {component -> frontmatter }>
126+ <ReactDocsLayout .Latest frontmatter = {component -> frontmatter }>
107127 content
108- </ManualDocsLayout . V800 >
109- | Version ("v9.0 .0" ) =>
110- <ManualDocsLayout . V900 frontmatter = {component -> frontmatter }>
128+ </ReactDocsLayout . Latest >
129+ | Version ("v0.10 .0" ) =>
130+ <ReactDocsLayout . V0100 frontmatter = {component -> frontmatter }>
111131 content
112- </ManualDocsLayout . V900 >
113- | Version ("v10.0 .0" ) =>
114- <ManualDocsLayout . V1000 frontmatter = {component -> frontmatter }>
132+ </ReactDocsLayout . V0100 >
133+ | Version ("v0.11 .0" ) =>
134+ <ReactDocsLayout . V0110 frontmatter = {component -> frontmatter }>
115135 content
116- </ManualDocsLayout . V1000 >
136+ </ReactDocsLayout . V0110 >
117137 | _ => React .null
118- }
119- }
120- | {base : ["docs" , "react" ], version } =>
121- switch version {
122- | Latest =>
123- <ReactDocsLayout .Latest frontmatter = {component -> frontmatter }>
124- content
125- </ReactDocsLayout .Latest >
126- | Version ("v0.10.0" ) =>
127- <ReactDocsLayout .V0100 frontmatter = {component -> frontmatter }> content </ReactDocsLayout .V0100 >
128- | Version ("v0.11.0" ) =>
129- <ReactDocsLayout .V0110 frontmatter = {component -> frontmatter }> content </ReactDocsLayout .V0110 >
130- | _ => React .null
131- }
138+ }}
139+ </EnableCollapsibleNavbar >
132140 | {base : ["docs" , "reason-compiler" ], version : Latest } =>
133- <ReasonCompilerDocsLayout > content </ReasonCompilerDocsLayout >
141+ <EnableCollapsibleNavbar >
142+ <ReasonCompilerDocsLayout > content </ReasonCompilerDocsLayout >
143+ </EnableCollapsibleNavbar >
134144 // common routes
135145 | {base } =>
136146 switch Belt .List .fromArray (base ) {
137147 | list {"community" , ... _rest } =>
138- <CommunityLayout frontmatter = {component -> frontmatter }> content </CommunityLayout >
148+ <EnableCollapsibleNavbar >
149+ <CommunityLayout frontmatter = {component -> frontmatter }> content </CommunityLayout >
150+ </EnableCollapsibleNavbar >
139151 | list {"try" } => content
140152 | list {"blog" } => content // Blog implements its own layout as well
141- | list {"syntax-lookup" } => content
142- | list {"packages" } => content
143- | list {"blog" , ... _rest } => // Here, the layout will be handled by the Blog_Article component
153+ | list {"syntax-lookup" } => <EnableCollapsibleNavbar > content </EnableCollapsibleNavbar >
154+ | list {"packages" } => <EnableCollapsibleNavbar > content </EnableCollapsibleNavbar >
155+ | list {"blog" , ... _rest } =>
156+ // Here, the layout will be handled by the Blog_Article component
144157 // to keep the frontmatter parsing etc in one place
145- content
158+ < EnableCollapsibleNavbar > content </ EnableCollapsibleNavbar >
146159 | _ =>
147160 let fm = component -> frontmatter -> DocFrontmatter .decode
148161 let title = switch url {
0 commit comments