File tree Expand file tree Collapse file tree 4 files changed +24
-10
lines changed Expand file tree Collapse file tree 4 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ type props = {
42
42
"pageProps": pageProps,
43
43
};
44
44
45
- [@ bs . get ] external frontmatter : React . component (Js . t ({.})) => Js . Json . t = "frontmatter" ;
45
+ [@ bs . get ]
46
+ external frontmatter : React . component (Js . t ({.})) => Js . Json . t =
47
+ "frontmatter" ;
46
48
47
49
let default = (props: props ): React . element => {
48
50
let component = props## "Component" ;
@@ -59,11 +61,14 @@ let default = (props: props): React.element => {
59
61
| {base: [| "docs" , "manual" |] , version} =>
60
62
switch (version) {
61
63
| Latest =>
62
- <ManualDocsLayout . Prose > content </ManualDocsLayout . Prose >
64
+ <ManualDocsLayout . Prose frontmatter= {component-> frontmatter}>
65
+ content
66
+ </ManualDocsLayout . Prose >
63
67
| Version ("v8.0.0" ) =>
64
- <ManualDocsLayout8_0_0 . Prose frontmatter= component->frontmatter> content </ManualDocsLayout8_0_0 . Prose >
65
- | _ =>
66
- React . null
68
+ <ManualDocsLayout8_0_0 . Prose frontmatter= {component-> frontmatter}>
69
+ content
70
+ </ManualDocsLayout8_0_0 . Prose >
71
+ | _ => React . null
67
72
}
68
73
| {base: [| "docs" , "reason-compiler" |] , version: Latest } =>
69
74
<ReasonCompilerDocsLayout > content </ReasonCompilerDocsLayout >
Original file line number Diff line number Diff line change @@ -395,7 +395,6 @@ let make =
395
395
++ version
396
396
++ "/"
397
397
++ Js . Array2 . joinWith(url. pagepath, "/" );
398
- Js . log2("targetUrl" , targetUrl);
399
398
router-> Next . Router . push(targetUrl);
400
399
};
401
400
<VersionSelect
Original file line number Diff line number Diff line change @@ -141,7 +141,12 @@ let categories = [|
141
141
142
142
module Docs = {
143
143
[@ react . component ]
144
- let make = (~components= Markdown . default, ~children) => {
144
+ let make =
145
+ (
146
+ ~frontmatter: option (Js . Json . t )=?,
147
+ ~components= Markdown . default,
148
+ ~children,
149
+ ) => {
145
150
let router = Next . Router . useRouter() ;
146
151
let route = router. route;
147
152
@@ -188,6 +193,7 @@ module Docs = {
188
193
title
189
194
availableVersions= allManualVersions
190
195
latestVersionLabel
196
+ ?frontmatter
191
197
?activeToc
192
198
?breadcrumbs>
193
199
children
@@ -197,7 +203,7 @@ module Docs = {
197
203
198
204
module Prose = {
199
205
[@ react . component ]
200
- let make = (~children) => {
201
- <Docs components= Markdown . default> children </Docs >;
206
+ let make = (~frontmatter : option ( Js . Json . t )=? , ~ children) => {
207
+ <Docs ?frontmatter components= Markdown . default> children </Docs >;
202
208
};
203
209
};
Original file line number Diff line number Diff line change @@ -94,6 +94,10 @@ let jsInteropNavs = [|
94
94
href: "/docs/manual/v8.0.0/bind-to-global-js-values" ,
95
95
},
96
96
{name: "JSON" , href: "/docs/manual/v8.0.0/json" },
97
+ {
98
+ name: "Use Illegal Identifier Names" ,
99
+ href: "/docs/manual/latest/use-illegal-identifier-names" ,
100
+ },
97
101
{
98
102
name: "Browser Support & Polyfills" ,
99
103
href: "/docs/manual/v8.0.0/browser-support-polyfills" ,
@@ -191,7 +195,7 @@ module Docs = {
191
195
{(
192
196
"You are currently looking at the "
193
197
++ version
194
- ++ " docs. You can find the latest manual page "
198
+ ++ " docs (Reason v3.6 syntax edition) . You can find the latest manual page "
195
199
)
196
200
-> s}
197
201
<A href= latestUrl> "here" -> s </A >
You can’t perform that action at this time.
0 commit comments