@@ -56,106 +56,98 @@ let make = (props: props): React.element => {
56
56
// docs routes
57
57
| {base : ["docs" , "manual" ], pagepath } =>
58
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
- }
59
+ switch pagepath [0 ] {
60
+ | Some ("api" ) =>
61
+ switch url -> Url .getVersionString {
62
+ | ("v11.0.0" | "v12.0.0" ) as version =>
63
+ switch (Array .length (pagepath ), pagepath [1 ]) {
64
+ | (1 , _ ) => <ApiOverviewLayout .Docs version > content </ApiOverviewLayout .Docs >
98
65
| _ => content
99
66
}
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 >
67
+ | "v8.0.0" =>
68
+ switch (Array .length (pagepath ), 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 >
122
75
| _ => React .null
123
76
}
124
- }}
125
- </EnableCollapsibleNavbar >
126
- | {base : ["docs" , "react" ], version } =>
127
- <EnableCollapsibleNavbar >
128
- {switch version {
129
- | Latest =>
130
- <ReactDocsLayout .Latest frontmatter = {component -> frontmatter }>
77
+ | "v9.0.0" =>
78
+ switch (Array .length (pagepath ), 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 >
85
+ | _ => React .null
86
+ }
87
+ | "v10.0.0" =>
88
+ switch (Array .length (pagepath ), 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 url -> Url .getVersionString {
101
+ | "v8.0.0" =>
102
+ <ManualDocsLayout .V800 frontmatter = {component -> frontmatter }>
103
+ content
104
+ </ManualDocsLayout .V800 >
105
+ | "v9.0.0" =>
106
+ <ManualDocsLayout .V900 frontmatter = {component -> frontmatter }>
131
107
content
132
- </ReactDocsLayout . Latest >
133
- | Version ( "v0.10 .0") =>
134
- <ReactDocsLayout . V0100 frontmatter = {component -> frontmatter }>
108
+ </ManualDocsLayout . V900 >
109
+ | "v10.0 .0" =>
110
+ <ManualDocsLayout . V1000 frontmatter = {component -> frontmatter }>
135
111
content
136
- </ReactDocsLayout . V0100 >
137
- | Version ( "v0.11 .0") =>
138
- <ReactDocsLayout . V0110 frontmatter = {component -> frontmatter }>
112
+ </ManualDocsLayout . V1000 >
113
+ | "v11.0 .0" =>
114
+ <ManualDocsLayout . V1100 frontmatter = {component -> frontmatter }>
139
115
content
140
- </ReactDocsLayout .V0110 >
116
+ </ManualDocsLayout .V1100 >
117
+ | "v12.0.0" =>
118
+ <ManualDocsLayout .V1200 frontmatter = {component -> frontmatter }>
119
+ content
120
+ </ManualDocsLayout .V1200 >
141
121
| _ => React .null
142
- }}
143
- </EnableCollapsibleNavbar >
122
+ }
123
+ }
124
+
125
+ | {base : ["docs" , "react" ], version } =>
126
+ switch version {
127
+ | Latest =>
128
+ <ReactDocsLayout .Latest frontmatter = {component -> frontmatter }>
129
+ content
130
+ </ReactDocsLayout .Latest >
131
+ | Version ("v0.10.0" ) =>
132
+ <ReactDocsLayout .V0100 frontmatter = {component -> frontmatter }> content </ReactDocsLayout .V0100 >
133
+ | Version ("v0.11.0" ) =>
134
+ <ReactDocsLayout .V0110 frontmatter = {component -> frontmatter }> content </ReactDocsLayout .V0110 >
135
+ | _ => React .null
136
+ }
137
+
144
138
// common routes
145
139
| {base } =>
146
140
switch List .fromArray (base ) {
147
141
| list {"community" , ... _rest } =>
148
- <EnableCollapsibleNavbar >
149
- <CommunityLayout frontmatter = {component -> frontmatter }> content </CommunityLayout >
150
- </EnableCollapsibleNavbar >
142
+ <CommunityLayout frontmatter = {component -> frontmatter }> content </CommunityLayout >
143
+
151
144
| list {"try" } => content
152
145
| 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
146
+ | list {"syntax-lookup" } => content
147
+ | list {"packages" } => content
148
+ | list {"blog" , ... _rest } => // Here, the layout will be handled by the Blog_Article component
157
149
// to keep the frontmatter parsing etc in one place
158
- < EnableCollapsibleNavbar > content </ EnableCollapsibleNavbar >
150
+ content
159
151
| _ =>
160
152
let fm = component -> frontmatter -> DocFrontmatter .decode
161
153
let title = switch url {
0 commit comments