@@ -8,6 +8,7 @@ Lowlight.(lowlight->registerLanguage("reason", reason));
|
8 | 8 | [@bs.module] external mdToJson: string => 'a = "@phenomic/markdown-as-json";
|
9 | 9 |
|
10 | 10 | Js.log("Docs pages...");
|
| 11 | + |
11 | 12 | let sourcePath = Path.join([|root, "docs"|]);
|
12 | 13 | let outputPath = Path.join([|root, "build", "docs-pages"|]);
|
13 | 14 | Path.join([|sourcePath, "**/*.md"|])
|
@@ -24,7 +25,12 @@ Path.join([|sourcePath, "**/*.md"|])
|
24 | 25 | let mdJson = mdToJson(file.content);
|
25 | 26 | let content =
|
26 | 27 | {
|
27 |
| -"filename": file.name |> Js.String.replace(root, ""), |
| 28 | +"filename": |
| 29 | +file.name |
| 30 | +|> Js.String.replace( |
| 31 | +root, |
| 32 | +"reason-react-native..io/blob/src/", |
| 33 | +), |
28 | 34 | "id": mdJson##id,
|
29 | 35 | "title": mdJson##title,
|
30 | 36 | "body": mdJson##body,
|
@@ -84,6 +90,10 @@ Path.join([|sourcePath, "**/*.md"|])
|
84 | 90 | |> Js.String.replace(
|
85 | 91 | Node.Path.resolve(root, "..") ++ "/",
|
86 | 92 | "",
|
| 93 | +) |
| 94 | +|> Js.String.replace( |
| 95 | +"reason-react-native", |
| 96 | +"reason-react-native/blob/master", |
87 | 97 | ),
|
88 | 98 | "id": mdJson##id,
|
89 | 99 | "title": mdJson##title,
|
@@ -150,7 +160,12 @@ Path.join([|sourcePath, "**/*.md"|])
|
150 | 160 | let mdJson = mdToJson(file.content);
|
151 | 161 | let content =
|
152 | 162 | {
|
153 |
| -"filename": file.name |> Js.String.replace(root, ""), |
| 163 | +"filename": |
| 164 | +file.name |
| 165 | +|> Js.String.replace( |
| 166 | +root, |
| 167 | +"reason-react-native..io/blob/src/", |
| 168 | +), |
154 | 169 | "id": mdJson##id,
|
155 | 170 | "title": mdJson##title,
|
156 | 171 | "author": mdJson##author,
|
|
0 commit comments