@@ -54,108 +54,98 @@ let make = (props: props): React.element => {
5454 // landing page
5555 | {base : [], pagepath : []} => <LandingPageLayout > content </LandingPageLayout >
5656 // docs routes
57- | {base : ["docs" , "manual" ], pagepath } =>
58- // check if it's an api route
59- <EnableCollapsibleNavbar >
60- {switch pagepath [0 ] {
61- | Some ("api" ) =>
62- switch url -> Url .getVersionString {
63- | ("v11.0.0" | "v12.0.0" ) as version =>
64- switch (Array .length (pagepath ), pagepath [1 ]) {
65- | (1 , _ ) => <ApiOverviewLayout .Docs version > content </ApiOverviewLayout .Docs >
66- | _ => content
67- }
68- | "v8.0.0" =>
69- switch (Array .length (pagepath ), 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- | "v9.0.0" =>
79- switch (Array .length (pagepath ), 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- | "v10.0.0" =>
89- switch (Array .length (pagepath ), 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- }
57+ | {base : ["docs" , "manual" ], pagepath } => // check if it's an api route
58+ switch pagepath [0 ] {
59+ | Some ("api" ) =>
60+ switch url -> Url .getVersionString {
61+ | ("v11.0.0" | "v12.0.0" ) as version =>
62+ switch (Array .length (pagepath ), pagepath [1 ]) {
63+ | (1 , _ ) => <ApiOverviewLayout .Docs version > content </ApiOverviewLayout .Docs >
9864 | _ => content
9965 }
100- | _ =>
101- switch url -> Url .getVersionString {
102- | "v8.0.0" =>
103- <ManualDocsLayout .V800 frontmatter = {component -> frontmatter }>
104- content
105- </ManualDocsLayout .V800 >
106- | "v9.0.0" =>
107- <ManualDocsLayout .V900 frontmatter = {component -> frontmatter }>
108- content
109- </ManualDocsLayout .V900 >
110- | "v10.0.0" =>
111- <ManualDocsLayout .V1000 frontmatter = {component -> frontmatter }>
112- content
113- </ManualDocsLayout .V1000 >
114- | "v11.0.0" =>
115- <ManualDocsLayout .V1100 frontmatter = {component -> frontmatter }>
116- content
117- </ManualDocsLayout .V1100 >
118- | "v12.0.0" =>
119- <ManualDocsLayout .V1200 frontmatter = {component -> frontmatter }>
120- content
121- </ManualDocsLayout .V1200 >
66+ | "v8.0.0" =>
67+ switch (Array .length (pagepath ), pagepath [1 ]) {
68+ | (1 , _ ) => <ApiOverviewLayout8_0_0 .Docs > content </ApiOverviewLayout8_0_0 .Docs >
69+ | (2 , Some ("js" )) => <JsDocsLayout8_0_0 .Prose > content </JsDocsLayout8_0_0 .Prose >
70+ | (2 , Some ("belt" )) => <BeltDocsLayout8_0_0 .Prose > content </BeltDocsLayout8_0_0 .Prose >
71+ | (_ , Some ("js" )) => <JsDocsLayout8_0_0 .Docs > content </JsDocsLayout8_0_0 .Docs >
72+ | (_ , Some ("belt" )) => <BeltDocsLayout8_0_0 .Docs > content </BeltDocsLayout8_0_0 .Docs >
73+ | (_ , Some ("dom" )) => <DomDocsLayout8_0_0 .Docs > content </DomDocsLayout8_0_0 .Docs >
12274 | _ => React .null
12375 }
124- }}
125- </EnableCollapsibleNavbar >
126- | {base : ["docs" , "react" ], version } =>
127- <EnableCollapsibleNavbar >
128- {switch version {
129- | Latest =>
130- <ReactDocsLayout .Latest frontmatter = {component -> frontmatter }>
76+ | "v9.0.0" =>
77+ switch (Array .length (pagepath ), pagepath [1 ]) {
78+ | (1 , _ ) => <ApiOverviewLayout9_0_0 .Docs > content </ApiOverviewLayout9_0_0 .Docs >
79+ | (2 , Some ("js" )) => <JsDocsLayout9_0_0 .Prose > content </JsDocsLayout9_0_0 .Prose >
80+ | (2 , Some ("belt" )) => <BeltDocsLayout9_0_0 .Prose > content </BeltDocsLayout9_0_0 .Prose >
81+ | (_ , Some ("js" )) => <JsDocsLayout9_0_0 .Docs > content </JsDocsLayout9_0_0 .Docs >
82+ | (_ , Some ("belt" )) => <BeltDocsLayout9_0_0 .Docs > content </BeltDocsLayout9_0_0 .Docs >
83+ | (_ , Some ("dom" )) => <DomDocsLayout9_0_0 .Docs > content </DomDocsLayout9_0_0 .Docs >
84+ | _ => React .null
85+ }
86+ | "v10.0.0" =>
87+ switch (Array .length (pagepath ), pagepath [1 ]) {
88+ | (1 , _ ) => <ApiOverviewLayout10_0_0 .Docs > content </ApiOverviewLayout10_0_0 .Docs >
89+ | (2 , Some ("js" )) => <JsDocsLayout10_0_0 .Prose > content </JsDocsLayout10_0_0 .Prose >
90+ | (2 , Some ("belt" )) => <BeltDocsLayout10_0_0 .Prose > content </BeltDocsLayout10_0_0 .Prose >
91+ | (_ , Some ("js" )) => <JsDocsLayout10_0_0 .Docs > content </JsDocsLayout10_0_0 .Docs >
92+ | (_ , Some ("belt" )) => <BeltDocsLayout10_0_0 .Docs > content </BeltDocsLayout10_0_0 .Docs >
93+ | (_ , Some ("dom" )) => <DomDocsLayout10_0_0 .Docs > content </DomDocsLayout10_0_0 .Docs >
94+ | _ => React .null
95+ }
96+ | _ => content
97+ }
98+ | _ =>
99+ switch url -> Url .getVersionString {
100+ | "v8.0.0" =>
101+ <ManualDocsLayout .V800 frontmatter = {component -> frontmatter }>
102+ content
103+ </ManualDocsLayout .V800 >
104+ | "v9.0.0" =>
105+ <ManualDocsLayout .V900 frontmatter = {component -> frontmatter }>
131106 content
132- </ReactDocsLayout . Latest >
133- | Version ( "v0.10 .0") =>
134- <ReactDocsLayout . V0100 frontmatter = {component -> frontmatter }>
107+ </ManualDocsLayout . V900 >
108+ | "v10.0 .0" =>
109+ <ManualDocsLayout . V1000 frontmatter = {component -> frontmatter }>
135110 content
136- </ReactDocsLayout . V0100 >
137- | Version ( "v0.11 .0") =>
138- <ReactDocsLayout . V0110 frontmatter = {component -> frontmatter }>
111+ </ManualDocsLayout . V1000 >
112+ | "v11.0 .0" =>
113+ <ManualDocsLayout . V1100 frontmatter = {component -> frontmatter }>
139114 content
140- </ReactDocsLayout .V0110 >
115+ </ManualDocsLayout .V1100 >
116+ | "v12.0.0" =>
117+ <ManualDocsLayout .V1200 frontmatter = {component -> frontmatter }>
118+ content
119+ </ManualDocsLayout .V1200 >
141120 | _ => React .null
142- }}
143- </EnableCollapsibleNavbar >
121+ }
122+ }
123+
124+ | {base : ["docs" , "react" ], version } => switch version {
125+ | Latest =>
126+ <ReactDocsLayout .Latest frontmatter = {component -> frontmatter }>
127+ content
128+ </ReactDocsLayout .Latest >
129+ | Version ("v0.10.0" ) =>
130+ <ReactDocsLayout .V0100 frontmatter = {component -> frontmatter }> content </ReactDocsLayout .V0100 >
131+ | Version ("v0.11.0" ) =>
132+ <ReactDocsLayout .V0110 frontmatter = {component -> frontmatter }> content </ReactDocsLayout .V0110 >
133+ | _ => React .null
134+ }
135+
144136 // common routes
145137 | {base } =>
146138 switch List .fromArray (base ) {
147139 | list {"community" , ... _rest } =>
148- <EnableCollapsibleNavbar >
149- <CommunityLayout frontmatter = {component -> frontmatter }> content </CommunityLayout >
150- </EnableCollapsibleNavbar >
140+ <CommunityLayout frontmatter = {component -> frontmatter }> content </CommunityLayout >
141+
151142 | list {"try" } => content
152143 | list {"blog" } => content // Blog implements its own layout as well
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
144+ | list {"syntax-lookup" } => content
145+ | list {"packages" } => content
146+ | list {"blog" , ... _rest } => // Here, the layout will be handled by the Blog_Article component
157147 // to keep the frontmatter parsing etc in one place
158- < EnableCollapsibleNavbar > content </ EnableCollapsibleNavbar >
148+ content
159149 | _ =>
160150 let fm = component -> frontmatter -> DocFrontmatter .decode
161151 let title = switch url {
0 commit comments