Skip to content

Commit 1b1c32b

Browse files
authored
Fix LLM links (#1143)
* Fix LLM links * Fix navigation to llms.txt (static resources)
1 parent ca751fb commit 1b1c32b

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

markdown-pages/docs/manual/llms.mdx

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

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

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

1919
...and package-level documentation:
2020

markdown-pages/docs/react/llms.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+
- [/llms/react/llms.txt](/llms/react/llms.txt) — a list of the available files for ReScript React.
15+
- [/llms/react/llms-full.txt](/llms/react/llm-full.txt) — complete documentation for ReScript React.
16+
- [/llms/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

public/llms/manual/template.mdx

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

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

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

1919
...and package-level documentation:
2020

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+
- [/llms/react/llms.txt](/llms/react/llms.txt) — a list of the available files for ReScript React.
15+
- [/llms/react/llms-full.txt](/llms/react/llm-full.txt) — complete documentation for ReScript React.
16+
- [/llms/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/components/Markdown.res

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,11 @@ module Hr = {
373373
module A = {
374374
@react.component
375375
let make = (~href, ~target=?, ~children) => {
376-
// In case we are handling a relative URL, we will use the Next routing
377-
if Util.Url.isAbsolute(href) {
376+
// FIXME: can this be improved/generalized?
377+
let shouldReloadDocument = href->String.startsWith("/llms")
378+
379+
// In case we are handling a relative URL, we will use React Router's link component.
380+
if Util.Url.isAbsolute(href) || shouldReloadDocument {
378381
<a
379382
href
380383
rel="noopener noreferrer"

0 commit comments

Comments
 (0)