Skip to content

Commit 114f445

Browse files
committed
fix more links
1 parent f67b5f5 commit 114f445

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

markdown-pages/docs/guidelines/publishing-packages.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Guidelines on publishing ReScript bindings and libraries to our Pa
44
canonical: "/guidelines/publishing-npm-packages"
55
---
66

7-
[<-- Back to packages](/packages)
7+
[Back to packages](/packages)
88

99
## Publishing ReScript Libraries / Bindings
1010

markdown-pages/docs/manual/interop-with-js-build-systems.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ This will:
4848

4949
"What if my build system uses a CSS/png/whatever loader and I'd like to use it in ReScript?"
5050

51-
Loaders are indeed troublesome; in the meantime, please use e.g. `%raw("require('./myStyles.css')")` at the top of your file. This just uses [`raw`](embed-raw-javascript.mdx) to compile the snippet into an actual JS require.
51+
Loaders are indeed troublesome; in the meantime, please use e.g. `%raw("require('./myStyles.css')")` at the top of your file. This just uses [`raw`](./embed-raw-javascript.mdx) to compile the snippet into an actual JS require.
5252

5353
## Getting Project's Dependencies
5454

5555
`rescript` generates one `MyFile.d` file per `MyFile` source file; you'll find them in `lib/bs`. These are human readable, machine-friendly list of the dependencies of said `MyFile`. You can read into them for your purpose (though mind the IO overhead). Use these files instead of creating your own dependency graph; we did the hard work of tracking the dependencies as best as possible (including inner modules, `open`s, module names overlap, etc).
5656

5757
## Run Script Per File Built
5858

59-
See [js-post-build](build-configuration.mdx#js-post-build). Though please use it sparingly; if you hook up a node.js script after each file built, you'll incur the node startup time per file!
59+
See [js-post-build](./build-configuration.mdx#js-post-build). Though please use it sparingly; if you hook up a node.js script after each file built, you'll incur the node startup time per file!

markdown-pages/docs/manual/llms.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Currently, we have the following files...
1818

1919
...and package-level documentation:
2020

21-
- [/docs/react/llms](/docs/react/llms) — the LLms documentation for ReScript React.
21+
- [/docs/react/llms](../react/llms.mdx) — the LLms documentation for ReScript React.
2222

2323
## Notes
2424

markdown-pages/docs/manual/migrate-to-v11.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For uncurried mode to take effect in ReScript 11 there is nothing to configure,
2626

2727
### Adapt suffix
2828

29-
ReScript 11 now allows having arbitrary suffixes in the generated JavaScript files. However, it is still recommended to stick to using `.res.js`, `.res.mjs` or `.res.cjs`. For more information, read the Build System Configuration about [suffixes](build-configuration.mdx#suffix).
29+
ReScript 11 now allows having arbitrary suffixes in the generated JavaScript files. However, it is still recommended to stick to using `.res.js`, `.res.mjs` or `.res.cjs`. For more information, read the Build System Configuration about [suffixes](./build-configuration.mdx#suffix).
3030

3131
### rescript.json
3232

@@ -92,7 +92,7 @@ If you use currying extensively and don't want to bother with adapting your code
9292
}
9393
```
9494

95-
For more information, read the Build System Configuration about [uncurried](build-configuration.mdx#uncurried).
95+
For more information, read the Build System Configuration about [uncurried](./build-configuration.mdx#uncurried).
9696

9797
## List of all breaking changes
9898

markdown-pages/docs/react/llms.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentati
1111

1212
Currently, we have the following files...
1313

14-
- [/docs/react/llms.txt](/llms/react//llms.txt) — a list of the available files for ReScript React.
15-
- [/docs/react/llms-full.txt](/llms/react//llm-full.txt) — complete documentation for ReScript React.
16-
- [/docs/react/llms-small.txt](/llms/react//llm-small.txt) — compressed version of the former, without examples for ReScript React.
14+
- [/docs/react/llms.txt](/llms/react/llms.txt) — a list of the available files for ReScript React.
15+
- [/docs/react/llms-full.txt](/llms/react/llm-full.txt) — complete documentation for ReScript React.
16+
- [/docs/react/llms-small.txt](/llms/react/llm-small.txt) — compressed version of the former, without examples for ReScript React.
1717

1818
...and the language documentation:
1919

20-
- [/docs/manual/llms](/docs/manual/llms) — the LLms documentation for ReScript.
20+
- [/docs/manual/llms](../manual/llms.mdx) — the LLms documentation for ReScript.
2121

2222
## Notes
2323

public/llms/react/template.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentati
1111

1212
Currently, we have the following files...
1313

14-
- [/docs/react/llms.txt](/llms/react//llms.txt) — a list of the available files for ReScript React.
15-
- [/docs/react/llms-full.txt](/llms/react//llm-full.txt) — complete documentation for ReScript React.
16-
- [/docs/react/llms-small.txt](/llms/react//llm-small.txt) — compressed version of the former, without examples for ReScript React.
14+
- [/docs/react/llms.txt](/llms/react/llms.txt) — a list of the available files for ReScript React.
15+
- [/docs/react/llms-full.txt](/llms/react/llm-full.txt) — complete documentation for ReScript React.
16+
- [/docs/react/llms-small.txt](/llms/react/llm-small.txt) — compressed version of the former, without examples for ReScript React.
1717

1818
...and the language documentation:
1919

src/Mdx.res

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,15 @@ let remarkLinkPlugin = (tree, vfile) => {
148148
)
149149
} else if url->String.startsWith("http") || url->String.startsWith("#") {
150150
()
151+
} else if (
152+
(!(url->String.includes("api")) && url->String.startsWith("/docs/")) ||
153+
url->String.startsWith("/blog/") ||
154+
url->String.startsWith("/community/") ||
155+
url->String.startsWith("/syntax-lookup/")
156+
) {
157+
JsExn.throw(
158+
Error(`Link to mdx file should use the relative path: ${url} in file ${filePath}`),
159+
)
151160
} else if url->String.startsWith(".") {
152161
let (path, hash) = {
153162
let splitHref = url->String.split("#")
@@ -169,15 +178,6 @@ let remarkLinkPlugin = (tree, vfile) => {
169178
->String.replace(vfile["cwd"] ++ "/markdown-pages", "")
170179
->String.replaceAll(".mdx", "")
171180
->String.replaceAll(".md", "") ++ hash
172-
} else if (
173-
(!(url->String.includes("api")) && url->String.startsWith("/docs")) ||
174-
url->String.startsWith("/blog") ||
175-
url->String.startsWith("/community") ||
176-
url->String.startsWith("/syntax-lookup")
177-
) {
178-
JsExn.throw(
179-
Error(`Link to mdx file should use the relative path: ${url} in file ${filePath}`),
180-
)
181181
} else if url->String.startsWith("/") {
182182
()
183183
} else {

0 commit comments

Comments
 (0)