Skip to content

Commit ae93a06

Browse files
authored
[codex] Add focused manual LLM files (#1297)
* feat: add focused manual llm files Generate focused language overview and JavaScript interop LLM files from the manual MDX sources. Reference the new files from the generated LLM indexes and cover the generator behavior with focused tests. * feat: split build and getting started llm files Generate focused build system and getting started LLM files from the manual MDX sources. Exclude the generated LLM index from the getting started slice and reference the new files from the generated LLM indexes. * chore: reduce llm index version noise Remove direct versioned manual and React links from the machine-readable LLM text indexes while keeping those links on the generated human-readable LLM pages. * chore: simplify llm file lists Remove current/default explanatory wording from generated LLM text indexes and human LLM pages while keeping the versioned file sections on the human pages. * test: stabilize navigation e2e links Wait on nav containers, target links by selector and text, and scroll links into view before clicking so the mobile secondary navigation test is less sensitive to route-transition and sticky-nav timing. * chore: drop versioned llm outputs Stop generating version-specific LLM text files for the manual and React docs, remove versioned links from the human LLM pages, and cover stale version cleanup in the generator tests.
1 parent 78bc4a5 commit ae93a06

9 files changed

Lines changed: 433 additions & 249 deletions

File tree

apps/docs/e2e/Navigation.cy.res

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ let waitForHydration = () => {
1515
// re-query from the DOM root on each retry.
1616

1717
let clickNavLink = (~testId, ~text) => {
18-
get(`[data-testid="${testId}"] a:visible`)
19-
->containsChainable(text)
18+
getByTestId(testId)
19+
->should("be.visible")
20+
->containsSelectorChainable("a", text)
21+
->scrollIntoView
22+
->should("be.visible")
2023
->click
2124
->ignore
2225
}
2326

2427
let clickMobileNavLink = text => {
25-
get(`[data-testid="mobile-nav"] a:visible`)
26-
->containsChainable(text)
28+
getByTestId("mobile-nav")
29+
->should("be.visible")
30+
->containsSelectorChainable("a", text)
31+
->scrollIntoView
32+
->should("be.visible")
2733
->click
2834
->ignore
2935
}

apps/docs/markdown-pages/docs/manual/llms.mdx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ order: 4
1010

1111
We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentation accessible to large language models and their applications.
1212

13-
This ReScript manual major version: `v12 (current version)`.
13+
## Files
1414

15-
The root `/llms.txt` file is the default entry point and always describes the current stable manual. Use the files under `/llms/manual/v13/` (pre-release version) or `/llms/manual/v12/` (current version) when you want an explicit major-version path. These major-version paths use the latest generated documentation for that major version and avoid full patch numbers in the URL.
16-
17-
## Default Current Files
18-
19-
- [/llms.txt](/llms.txt) - a list of the available files for the current ReScript language manual.
20-
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) - complete current documentation for the ReScript language.
21-
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) - abridged current documentation without detailed examples.
15+
- [/llms.txt](/llms.txt) - a list of the available files for the ReScript language manual.
16+
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) - complete documentation for the ReScript language.
17+
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) - abridged documentation without detailed examples.
18+
- [/llms/manual/language-overview/llm.txt](/llms/manual/language-overview/llm.txt) - focused documentation for ReScript syntax and core language features.
19+
- [/llms/manual/javascript-interop/llm.txt](/llms/manual/javascript-interop/llm.txt) - focused documentation for binding to JavaScript and TypeScript code.
20+
- [/llms/manual/build-system/llm.txt](/llms/manual/build-system/llm.txt) - focused documentation for build configuration, project structure, and build-tool integration.
21+
- [/llms/manual/getting-started/llm.txt](/llms/manual/getting-started/llm.txt) - focused documentation for installation, editor setup, migrations, and JavaScript onboarding.
2222

2323
## Package Documentation
2424

@@ -27,12 +27,3 @@ The root `/llms.txt` file is the default entry point and always describes the cu
2727
## Notes
2828

2929
- The content is automatically generated from the same source as the official documentation for the specific version.
30-
31-
## Major Version Files
32-
33-
- [v13 pre-release LLMs index](/llms/manual/v13/llms.txt) - a list of the available files for the latest ReScript v13 pre-release documentation.
34-
- [v13 pre-release complete documentation](/llms/manual/v13/llm-full.txt) - complete latest ReScript v13 pre-release documentation.
35-
- [v13 pre-release abridged documentation](/llms/manual/v13/llm-small.txt) - abridged latest ReScript v13 pre-release documentation.
36-
- [v12 current LLMs index](/llms/manual/v12/llms.txt) - a list of the available files for the current ReScript v12 documentation.
37-
- [v12 current complete documentation](/llms/manual/v12/llm-full.txt) - complete current ReScript v12 documentation.
38-
- [v12 current abridged documentation](/llms/manual/v12/llm-small.txt) - abridged current ReScript v12 documentation.

apps/docs/markdown-pages/docs/react/llms.mdx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,11 @@ section: "Overview"
99

1010
We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentation accessible to large language models and their applications.
1111

12-
Current ReScript React documentation version: `v0.14.2`.
13-
ReScript React package version: `v0.14.2`.
14-
React version: `v19.2.4`.
12+
## Files
1513

16-
The unversioned files under `/llms/react/` are the default entry points and always describe the current ReScript React docs. Use the versioned files under `/llms/react/v0.14.2/` when you want a stable path for this ReScript React documentation version.
17-
18-
## Default Current Files
19-
20-
- [/llms/react/llms.txt](/llms/react/llms.txt) - a list of the available files for the current ReScript React docs.
21-
- [/llms/react/llm-full.txt](/llms/react/llm-full.txt) - complete current documentation for ReScript React.
22-
- [/llms/react/llm-small.txt](/llms/react/llm-small.txt) - abridged current documentation without detailed examples.
23-
24-
## Versioned Files
25-
26-
- [/llms/react/v0.14.2/llms.txt](/llms/react/v0.14.2/llms.txt) - a list of the available files for ReScript React `v0.14.2`.
27-
- [/llms/react/v0.14.2/llm-full.txt](/llms/react/v0.14.2/llm-full.txt) - complete documentation for ReScript React `v0.14.2`.
28-
- [/llms/react/v0.14.2/llm-small.txt](/llms/react/v0.14.2/llm-small.txt) - abridged documentation for ReScript React `v0.14.2`.
14+
- [/llms/react/llms.txt](/llms/react/llms.txt) - a list of the available files for ReScript React docs.
15+
- [/llms/react/llm-full.txt](/llms/react/llm-full.txt) - complete documentation for ReScript React.
16+
- [/llms/react/llm-small.txt](/llms/react/llm-small.txt) - abridged documentation without detailed examples.
2917

3018
## Language Documentation
3119

apps/docs/public/llms/manual/template.mdx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ order: 4
1010

1111
We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentation accessible to large language models and their applications.
1212

13-
This ReScript manual major version: `<MANUAL_VERSION_LABEL>`.
13+
## Files
1414

15-
The root `/llms.txt` file is the default entry point and always describes the current stable manual. Use the files under `/llms/manual/v13/` (pre-release version) or `/llms/manual/v12/` (current version) when you want an explicit major-version path. These major-version paths use the latest generated documentation for that major version and avoid full patch numbers in the URL.
16-
17-
## Default Current Files
18-
19-
- [/llms.txt](/llms.txt) - a list of the available files for the current ReScript language manual.
20-
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) - complete current documentation for the ReScript language.
21-
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) - abridged current documentation without detailed examples.
15+
- [/llms.txt](/llms.txt) - a list of the available files for the ReScript language manual.
16+
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) - complete documentation for the ReScript language.
17+
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) - abridged documentation without detailed examples.
18+
- [/llms/manual/language-overview/llm.txt](/llms/manual/language-overview/llm.txt) - focused documentation for ReScript syntax and core language features.
19+
- [/llms/manual/javascript-interop/llm.txt](/llms/manual/javascript-interop/llm.txt) - focused documentation for binding to JavaScript and TypeScript code.
20+
- [/llms/manual/build-system/llm.txt](/llms/manual/build-system/llm.txt) - focused documentation for build configuration, project structure, and build-tool integration.
21+
- [/llms/manual/getting-started/llm.txt](/llms/manual/getting-started/llm.txt) - focused documentation for installation, editor setup, migrations, and JavaScript onboarding.
2222

2323
## Package Documentation
2424

@@ -27,12 +27,3 @@ The root `/llms.txt` file is the default entry point and always describes the cu
2727
## Notes
2828

2929
- The content is automatically generated from the same source as the official documentation for the specific version.
30-
31-
## Major Version Files
32-
33-
- [v13 pre-release LLMs index](/llms/manual/v13/llms.txt) - a list of the available files for the latest ReScript v13 pre-release documentation.
34-
- [v13 pre-release complete documentation](/llms/manual/v13/llm-full.txt) - complete latest ReScript v13 pre-release documentation.
35-
- [v13 pre-release abridged documentation](/llms/manual/v13/llm-small.txt) - abridged latest ReScript v13 pre-release documentation.
36-
- [v12 current LLMs index](/llms/manual/v12/llms.txt) - a list of the available files for the current ReScript v12 documentation.
37-
- [v12 current complete documentation](/llms/manual/v12/llm-full.txt) - complete current ReScript v12 documentation.
38-
- [v12 current abridged documentation](/llms/manual/v12/llm-small.txt) - abridged current ReScript v12 documentation.

apps/docs/public/llms/manual/template.txt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
> ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript. It comes with a lightning fast compiler toolchain that scales to any codebase size.
44

5-
## Documentation Sets
6-
7-
This ReScript manual major version: <MANUAL_VERSION_LABEL>.
8-
9-
The root `/llms.txt` file is the default entry point and always describes the current stable manual. Use the files under `/llms/manual/v13/` (pre-release version) or `/llms/manual/v12/` (current version) when you want an explicit major-version path. These major-version paths use the latest generated documentation for that major version and avoid full patch numbers in the URL.
10-
11-
### Default Current Files
5+
## Files
126

137
- [LLMs index](https://rescript-lang.org/llms.txt): This file
14-
- [Complete current documentation](https://rescript-lang.org/llms/manual/llm-full.txt): The complete current ReScript documentation including all examples and additional content
15-
- [Abridged current documentation](https://rescript-lang.org/llms/manual/llm-small.txt): A minimal current version of the ReScript documentation, with the essential content for quick reference
8+
- [Complete documentation](https://rescript-lang.org/llms/manual/llm-full.txt): The complete ReScript documentation including all examples and additional content
9+
- [Abridged documentation](https://rescript-lang.org/llms/manual/llm-small.txt): A minimal ReScript documentation file with the essential content for quick reference
10+
- [Language overview](https://rescript-lang.org/llms/manual/language-overview/llm.txt): Focused documentation for ReScript syntax and core language features
11+
- [JavaScript interop](https://rescript-lang.org/llms/manual/javascript-interop/llm.txt): Focused documentation for binding to JavaScript and TypeScript code
12+
- [Build system](https://rescript-lang.org/llms/manual/build-system/llm.txt): Focused documentation for build configuration, project structure, and build-tool integration
13+
- [Getting started](https://rescript-lang.org/llms/manual/getting-started/llm.txt): Focused documentation for installation, editor setup, migrations, and JavaScript onboarding
1614

17-
## Individual Package Documentation
15+
## Package Documentation
1816

1917
- [ReScript React documentation](https://rescript-lang.org/llms/react/llms.txt): This is the developer documentation for ReScript React.
2018

@@ -24,7 +22,3 @@ The root `/llms.txt` file is the default entry point and always describes the cu
2422
- The complete documentation includes all content from the official documentation
2523
- Package-specific documentation files contain only the content relevant to that package
2624
- The content is automatically generated from the same source as the official documentation for the specific version
27-
28-
### Major Version Files
29-
30-
<MANUAL_VERSION_LINKS>

apps/docs/public/llms/react/template.mdx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,11 @@ section: "Overview"
99

1010
We adhere to the [llms.txt convention](https://llmstxt.org/) to make documentation accessible to large language models and their applications.
1111

12-
Current ReScript React documentation version: `<VERSION>`.
13-
ReScript React package version: `<RESCRIPT_REACT_VERSION>`.
14-
React version: `<REACT_VERSION>`.
12+
## Files
1513

16-
The unversioned files under `/llms/react/` are the default entry points and always describe the current ReScript React docs. Use the versioned files under `/llms/react/<VERSION>/` when you want a stable path for this ReScript React documentation version.
17-
18-
## Default Current Files
19-
20-
- [/llms/react/llms.txt](/llms/react/llms.txt) - a list of the available files for the current ReScript React docs.
21-
- [/llms/react/llm-full.txt](/llms/react/llm-full.txt) - complete current documentation for ReScript React.
22-
- [/llms/react/llm-small.txt](/llms/react/llm-small.txt) - abridged current documentation without detailed examples.
23-
24-
## Versioned Files
25-
26-
- [/llms/react/<VERSION>/llms.txt](/llms/react/<VERSION>/llms.txt) - a list of the available files for ReScript React `<VERSION>`.
27-
- [/llms/react/<VERSION>/llm-full.txt](/llms/react/<VERSION>/llm-full.txt) - complete documentation for ReScript React `<VERSION>`.
28-
- [/llms/react/<VERSION>/llm-small.txt](/llms/react/<VERSION>/llm-small.txt) - abridged documentation for ReScript React `<VERSION>`.
14+
- [/llms/react/llms.txt](/llms/react/llms.txt) - a list of the available files for ReScript React docs.
15+
- [/llms/react/llm-full.txt](/llms/react/llm-full.txt) - complete documentation for ReScript React.
16+
- [/llms/react/llm-small.txt](/llms/react/llm-small.txt) - abridged documentation without detailed examples.
2917

3018
## Language Documentation
3119

apps/docs/public/llms/react/template.txt

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,11 @@
22

33
> ReScript React is a strongly typed interface for React, designed to integrate seamlessly with modern React (>= v18.0) while compiling to idiomatic JavaScript, enabling robust and scalable React applications.
44

5-
## ReScript React Documentation
6-
7-
Current ReScript React documentation version: <VERSION>.
8-
ReScript React package version: <RESCRIPT_REACT_VERSION>.
9-
React version: <REACT_VERSION>.
10-
11-
The unversioned files under `/llms/react/` are the default entry points and always describe the current ReScript React docs. Use the versioned files under `/llms/react/<VERSION>/` when you want a stable path for this ReScript React documentation version.
12-
13-
### Default Current Files
5+
## Files
146

157
- [LLMs index](https://rescript-lang.org/llms/react/llms.txt): This file
16-
- [Complete current documentation](https://rescript-lang.org/llms/react/llm-full.txt): The complete current ReScript React documentation including all examples and additional content
17-
- [Abridged current documentation](https://rescript-lang.org/llms/react/llm-small.txt): A minimal current version of the ReScript React documentation, with the essential content for quick reference
18-
19-
### Versioned Files
20-
21-
- [<VERSION> LLMs index](https://rescript-lang.org/llms/react/<VERSION>/llms.txt): This file for ReScript React <VERSION>
22-
- [<VERSION> complete documentation](https://rescript-lang.org/llms/react/<VERSION>/llm-full.txt): The complete ReScript React <VERSION> documentation including all examples and additional content
23-
- [<VERSION> abridged documentation](https://rescript-lang.org/llms/react/<VERSION>/llm-small.txt): A minimal ReScript React <VERSION> reference with the essential content
8+
- [Complete documentation](https://rescript-lang.org/llms/react/llm-full.txt): The complete ReScript React documentation including all examples and additional content
9+
- [Abridged documentation](https://rescript-lang.org/llms/react/llm-small.txt): A minimal ReScript React documentation file with the essential content for quick reference
2410

2511
## Language Documentation
2612

0 commit comments

Comments
 (0)