Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ jobs:
if [[ "$RAW_BRANCH" == "master" ]]; then
echo "VITE_DEPLOYMENT_URL=" >> "$GITHUB_ENV"
else
SAFE_BRANCH="${RAW_BRANCH//\//-}"
SAFE_BRANCH=$(echo "$SAFE_BRANCH" | tr '[:upper:]' '[:lower:]')
SAFE_BRANCH=$(echo "$RAW_BRANCH" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/^-+//; s/-+$//; s/-+/-/g')
SAFE_BRANCH="${SAFE_BRANCH:0:28}"
echo "SAFE_BRANCH=$SAFE_BRANCH" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -109,9 +107,7 @@ jobs:
if [[ "$RAW_BRANCH" == "master" ]]; then
CYPRESS_BASE_URL="https://rescript-lang.org"
else
SAFE_BRANCH="${RAW_BRANCH//\//-}"
SAFE_BRANCH=$(echo "$SAFE_BRANCH" | tr '[:upper:]' '[:lower:]')
SAFE_BRANCH=$(echo "$RAW_BRANCH" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9-]+/-/g; s/^-+//; s/-+$//; s/-+/-/g')
SAFE_BRANCH="${SAFE_BRANCH:0:28}"
CYPRESS_BASE_URL="https://${SAFE_BRANCH}.rescript-lang.pages.dev"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ apps/docs/scripts/generate_*.jsx
apps/docs/scripts/LogAlgoliaEnvStatus.jsx

# Generated via generate-llms script
apps/docs/public/llms.txt
apps/docs/public/llms/manual/**/llm*.txt
apps/docs/public/llms/react/**/llm*.txt
apps/docs/markdown-pages/docs/**/**/llms.mdx
Expand Down
7 changes: 2 additions & 5 deletions apps/docs/__tests__/MarkdownComponents_.test.res
Original file line number Diff line number Diff line change
Expand Up @@ -360,18 +360,15 @@ test("renders Image with small size", async () => {

let screen = await render(
<div dataTestId="image-small-wrapper">
<Markdown.Image
src="https://rescript-lang.org/brand/rescript-brandmark.svg"
size=#small
caption="Small image"
/>
<Markdown.Image src="/brand/rescript-brandmark.svg" size=#small caption="Small image" />
</div>,
)

let caption = await screen->getByText("Small image")
await element(caption)->toBeVisible

let wrapper = await screen->getByTestId("image-small-wrapper")
await waitForImages("[data-testid='image-small-wrapper']")
await element(wrapper)->toMatchScreenshot("markdown-image-small")
})

Expand Down
33 changes: 26 additions & 7 deletions apps/docs/markdown-pages/docs/manual/llms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,35 @@ order: 4

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

Currently, we have the following files...
This ReScript manual major version: `v12 (current version)`.

- [/llms/manual/llms.txt](/llms/manual/llms.txt) — a list of the available files for ReScript language.
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) — complete documentation for ReScript language.
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) — compressed version of the former, without examples.
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), `/llms/manual/v12/` (current version), `/llms/manual/v11/`, or `/llms/manual/v10/` 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.

...and package-level documentation:
## Default Current Files

- [/docs/react/llms](../react/llms.mdx) — the LLms documentation for ReScript React.
- [/llms.txt](/llms.txt) - a list of the available files for the current ReScript language manual.
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) - complete current documentation for the ReScript language.
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) - abridged current documentation without detailed examples.

## Package Documentation

- [/docs/react/llms](../react/llms.mdx) - the LLM documentation for ReScript React.

## Notes

- The content is automatically generated from the same source as the official documentation for the specific version
- The content is automatically generated from the same source as the official documentation for the specific version.

## Major Version Files

- [v13 pre-release LLMs index](/llms/manual/v13/llms.txt) - a list of the available files for the latest ReScript v13 pre-release documentation.
- [v13 pre-release complete documentation](/llms/manual/v13/llm-full.txt) - complete latest ReScript v13 pre-release documentation.
- [v13 pre-release abridged documentation](/llms/manual/v13/llm-small.txt) - abridged latest ReScript v13 pre-release documentation.
- [v12 current LLMs index](/llms/manual/v12/llms.txt) - a list of the available files for the current ReScript v12 documentation.
- [v12 current complete documentation](/llms/manual/v12/llm-full.txt) - complete current ReScript v12 documentation.
- [v12 current abridged documentation](/llms/manual/v12/llm-small.txt) - abridged current ReScript v12 documentation.
- [/llms/manual/v11/llms.txt](/llms/manual/v11/llms.txt) - a list of the available files for the latest ReScript v11 documentation.
- [/llms/manual/v11/llm-full.txt](/llms/manual/v11/llm-full.txt) - complete latest ReScript v11 documentation.
- [/llms/manual/v11/llm-small.txt](/llms/manual/v11/llm-small.txt) - abridged latest ReScript v11 documentation.
- [/llms/manual/v10/llms.txt](/llms/manual/v10/llms.txt) - a list of the available files for the latest ReScript v10 documentation.
- [/llms/manual/v10/llm-full.txt](/llms/manual/v10/llm-full.txt) - complete latest ReScript v10 documentation.
- [/llms/manual/v10/llm-small.txt](/llms/manual/v10/llm-small.txt) - abridged latest ReScript v10 documentation.
26 changes: 19 additions & 7 deletions apps/docs/markdown-pages/docs/react/llms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ section: "Overview"

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

Currently, we have the following files...
Current ReScript React documentation version: `v0.14.2`.
ReScript React package version: `v0.14.2`.
React version: `v19.2.4`.

- [/llms/react/llms.txt](/llms/react/llms.txt) — a list of the available files for ReScript React.
- [/llms/react/llms-full.txt](/llms/react/llm-full.txt) — complete documentation for ReScript React.
- [/llms/react/llms-small.txt](/llms/react/llm-small.txt) — compressed version of the former, without examples for ReScript React.
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.

...and the language documentation:
## Default Current Files

- [/docs/manual/llms](../manual/llms.mdx) — the LLms documentation for ReScript.
- [/llms/react/llms.txt](/llms/react/llms.txt) - a list of the available files for the current ReScript React docs.
- [/llms/react/llm-full.txt](/llms/react/llm-full.txt) - complete current documentation for ReScript React.
- [/llms/react/llm-small.txt](/llms/react/llm-small.txt) - abridged current documentation without detailed examples.

## Versioned Files

- [/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`.
- [/llms/react/v0.14.2/llm-full.txt](/llms/react/v0.14.2/llm-full.txt) - complete documentation for ReScript React `v0.14.2`.
- [/llms/react/v0.14.2/llm-small.txt](/llms/react/v0.14.2/llm-small.txt) - abridged documentation for ReScript React `v0.14.2`.

## Language Documentation

- [/llms.txt](/llms.txt) - the LLM documentation for ReScript.

## Notes

- The content is automatically generated from the same source as the official documentation for the specific version
- The content is automatically generated from the same source as the official documentation for the specific version.
4 changes: 4 additions & 0 deletions apps/docs/public/docs/context7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"url": "https://context7.com/websites/rescript-lang",
"public_key": "pk_dEopRkFptH4ndnTyOuXEb"
}
33 changes: 26 additions & 7 deletions apps/docs/public/llms/manual/template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,35 @@ order: 4

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

Currently, we have the following files...
This ReScript manual major version: `<MANUAL_VERSION_LABEL>`.

- [/llms/manual/llms.txt](/llms/manual/llms.txt) — a list of the available files for ReScript language.
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) — complete documentation for ReScript language.
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) — compressed version of the former, without examples.
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), `/llms/manual/v12/` (current version), `/llms/manual/v11/`, or `/llms/manual/v10/` 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.

...and package-level documentation:
## Default Current Files

- [/docs/react/llms](../react/llms.mdx) — the LLms documentation for ReScript React.
- [/llms.txt](/llms.txt) - a list of the available files for the current ReScript language manual.
- [/llms/manual/llm-full.txt](/llms/manual/llm-full.txt) - complete current documentation for the ReScript language.
- [/llms/manual/llm-small.txt](/llms/manual/llm-small.txt) - abridged current documentation without detailed examples.

## Package Documentation

- [/docs/react/llms](../react/llms.mdx) - the LLM documentation for ReScript React.

## Notes

- The content is automatically generated from the same source as the official documentation for the specific version
- The content is automatically generated from the same source as the official documentation for the specific version.

## Major Version Files

- [v13 pre-release LLMs index](/llms/manual/v13/llms.txt) - a list of the available files for the latest ReScript v13 pre-release documentation.
- [v13 pre-release complete documentation](/llms/manual/v13/llm-full.txt) - complete latest ReScript v13 pre-release documentation.
- [v13 pre-release abridged documentation](/llms/manual/v13/llm-small.txt) - abridged latest ReScript v13 pre-release documentation.
- [v12 current LLMs index](/llms/manual/v12/llms.txt) - a list of the available files for the current ReScript v12 documentation.
- [v12 current complete documentation](/llms/manual/v12/llm-full.txt) - complete current ReScript v12 documentation.
- [v12 current abridged documentation](/llms/manual/v12/llm-small.txt) - abridged current ReScript v12 documentation.
- [/llms/manual/v11/llms.txt](/llms/manual/v11/llms.txt) - a list of the available files for the latest ReScript v11 documentation.
- [/llms/manual/v11/llm-full.txt](/llms/manual/v11/llm-full.txt) - complete latest ReScript v11 documentation.
- [/llms/manual/v11/llm-small.txt](/llms/manual/v11/llm-small.txt) - abridged latest ReScript v11 documentation.
- [/llms/manual/v10/llms.txt](/llms/manual/v10/llms.txt) - a list of the available files for the latest ReScript v10 documentation.
- [/llms/manual/v10/llm-full.txt](/llms/manual/v10/llm-full.txt) - complete latest ReScript v10 documentation.
- [/llms/manual/v10/llm-small.txt](/llms/manual/v10/llm-small.txt) - abridged latest ReScript v10 documentation.
19 changes: 15 additions & 4 deletions apps/docs/public/llms/manual/template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,27 @@

## Documentation Sets

- [Complete documentation](https://rescript-lang.org/llms/manual/<VERSION>/llm-full.txt): The complete ReScript documentation including all examples and additional content
- [Abridged documentation](https://rescript-lang.org/llms/manual/<VERSION>/llm-small.txt): A minimal version of the ReScript documentation, with the essential content for quick reference
This ReScript manual major version: <MANUAL_VERSION_LABEL>.

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), `/llms/manual/v12/` (current version), `/llms/manual/v11/`, or `/llms/manual/v10/` 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.

### Default Current Files

- [LLMs index](https://rescript-lang.org/llms.txt): This file
- [Complete current documentation](https://rescript-lang.org/llms/manual/llm-full.txt): The complete current ReScript documentation including all examples and additional content
- [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

## Individual Package Documentation

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

## Notes

- The abridged documentation excludes the detailed examples, and supplementary information
- The abridged documentation excludes the detailed examples and supplementary information
- The complete documentation includes all content from the official documentation
- Package-specific documentation files contain only the content relevant to that package
- The content is automatically generated from the same source as the official documentation for the specific version
- The content is automatically generated from the same source as the official documentation for the specific version

### Major Version Files

<MANUAL_VERSION_LINKS>
26 changes: 19 additions & 7 deletions apps/docs/public/llms/react/template.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ section: "Overview"

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

Currently, we have the following files...
Current ReScript React documentation version: `<VERSION>`.
ReScript React package version: `<RESCRIPT_REACT_VERSION>`.
React version: `<REACT_VERSION>`.

- [/llms/react/llms.txt](/llms/react/llms.txt) — a list of the available files for ReScript React.
- [/llms/react/llms-full.txt](/llms/react/llm-full.txt) — complete documentation for ReScript React.
- [/llms/react/llms-small.txt](/llms/react/llm-small.txt) — compressed version of the former, without examples for ReScript React.
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.

...and the language documentation:
## Default Current Files

- [/docs/manual/llms](../manual/llms.mdx) — the LLms documentation for ReScript.
- [/llms/react/llms.txt](/llms/react/llms.txt) - a list of the available files for the current ReScript React docs.
- [/llms/react/llm-full.txt](/llms/react/llm-full.txt) - complete current documentation for ReScript React.
- [/llms/react/llm-small.txt](/llms/react/llm-small.txt) - abridged current documentation without detailed examples.

## Versioned Files

- [/llms/react/<VERSION>/llms.txt](/llms/react/<VERSION>/llms.txt) - a list of the available files for ReScript React `<VERSION>`.
- [/llms/react/<VERSION>/llm-full.txt](/llms/react/<VERSION>/llm-full.txt) - complete documentation for ReScript React `<VERSION>`.
- [/llms/react/<VERSION>/llm-small.txt](/llms/react/<VERSION>/llm-small.txt) - abridged documentation for ReScript React `<VERSION>`.

## Language Documentation

- [/llms.txt](/llms.txt) - the LLM documentation for ReScript.

## Notes

- The content is automatically generated from the same source as the official documentation for the specific version
- The content is automatically generated from the same source as the official documentation for the specific version.
Loading
Loading