Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/deploy-fork-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: apps/docs
command: pages deploy out --project-name=rescript-lang-org
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: 4.61.1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: apps/docs
command: pages deploy out --project-name=rescript-lang-org --branch=${{ env.SAFE_BRANCH }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: 4.63.0
Expand Down Expand Up @@ -101,5 +102,6 @@ jobs:
uses: cypress-io/github-action@v7
with:
install: false
working-directory: apps/docs
browser: chrome
config: baseUrl=${{ needs.deploy.outputs.deployment-url }}
66 changes: 39 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,63 @@
*.swo
.worktrees/

# Generated via update-index script
public/blog/feed.xml
# Generated via docs update-index script
apps/docs/public/blog/feed.xml

node_modules/
.next/
out/
apps/docs/out/
index_data/*.json
apps/docs/index_data/*.json

# Generated via test examples script
# Generated via docs test examples script
temp
temp-js-output
temp-jsx-preserve
apps/docs/temp
apps/docs/temp-js-output
apps/docs/temp-jsx-preserve

.bsb.lock
.merlin
lib/
apps/docs/lib/

.vercel

src/**/*.mjs
src/**/*.jsx
scripts/gendocs.mjs
scripts/generate_*.mjs
scripts/gendocs.jsx
scripts/generate_*.jsx
apps/docs/src/**/*.mjs
apps/docs/src/**/*.jsx
apps/docs/scripts/gendocs.mjs
apps/docs/scripts/generate_*.mjs
apps/docs/scripts/gendocs.jsx
apps/docs/scripts/generate_*.jsx

# Generated via generate-llms script
public/llms/manual/**/llm*.txt
public/llms/react/**/llm*.txt
pages/docs/**/**/llms.mdx

public/playground-bundles/
!public/_redirects
apps/docs/public/llms/manual/**/llm*.txt
apps/docs/public/llms/react/**/llm*.txt
apps/docs/markdown-pages/docs/**/**/llms.mdx

apps/docs/public/playground-bundles/
!apps/docs/public/_redirects

dist
build
apps/docs/dist
apps/docs/build
.react-router
.worktrees/
apps/docs/.react-router
mdx-manifest.json

app/**/*.mjs
app/**/*.jsx
functions/**/*.mjs
functions/**/*.jsx
__tests__/**/*.mjs
__tests__/**/*.jsx
e2e/**/*.mjs
e2e/**/*.jsx
apps/docs/mdx-manifest.json

apps/docs/app/**/*.mjs
apps/docs/app/**/*.jsx
apps/docs/functions/**/*.mjs
apps/docs/functions/**/*.jsx
apps/docs/__tests__/**/*.mjs
apps/docs/__tests__/**/*.jsx
apps/docs/e2e/**/*.mjs
apps/docs/e2e/**/*.jsx
!_shims.mjs
!_shims.jsx

Expand All @@ -65,16 +73,20 @@ e2e/**/*.jsx

# wrangler
.wrangler
apps/docs/.wrangler

# Scripts generated from rolldown to convert them from .jsx files to .mjs files
# Scripts generated from tsdown to convert them from .jsx files to .mjs files
_scripts
apps/docs/_scripts

# Local env files
.env.local
apps/docs/.env.local

# Local git worktrees
.worktrees

# Vitest screenshots
!__tests__/__screenshots__/**/*
!apps/docs/__tests__/__screenshots__/**/*
.vitest-attachments
apps/docs/.vitest-attachments
31 changes: 16 additions & 15 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
"sortPackageJson": false,
"ignorePatterns": [
"!_shims.mjs",
"!public/_redirects",
"!apps/docs/public/_redirects",
".DS_Store",
".worktrees/",
".next/",
".react-router",
"*.swo",
"*.swp",
"app/**/*.mjs",
"apps/docs/app/**/*.mjs",
"build",
"data/api/**/*.json",
"apps/docs/data/api/**/*.json",
"dist",
"index_data/*.json",
"apps/docs/index_data/*.json",
"node_modules/",
"out/",
"public/playground-bundles/",
"public/blog/feed.xml",
"apps/docs/out/",
"apps/docs/public/playground-bundles/",
"apps/docs/public/blog/feed.xml",
"_tempFile.cmi",
"_tempFile.cmj",
"_tempFile.cmt",
Expand All @@ -28,15 +28,16 @@
".bsb.lock",
".merlin",
"lib/",
"apps/docs/lib/",
".vercel",
"src/**/*.mjs",
"scripts/gendocs.mjs",
"scripts/generate_*.mjs",
"public/llms/manual/**/llm*.txt",
"public/llms/react/**/llm*.txt",
"pages/docs/**/**/llms.mdx",
"markdown-pages/docs/manual/installation.mdx",
"apps/docs/src/**/*.mjs",
"apps/docs/scripts/gendocs.mjs",
"apps/docs/scripts/generate_*.mjs",
"apps/docs/public/llms/manual/**/llm*.txt",
"apps/docs/public/llms/react/**/llm*.txt",
"apps/docs/markdown-pages/docs/**/**/llms.mdx",
"apps/docs/markdown-pages/docs/manual/installation.mdx",
".yarn/releases/yarn-4.12.0.cjs",
"data/api/*"
"apps/docs/data/api/*"
]
}
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ SHELL = /bin/bash

node_modules/.bin/rescript:
yarn install
yarn update-index

build: node_modules/.bin/rescript
node_modules/.bin/rescript
yarn update-index
build: node_modules/.bin/rescript
yarn build:res
yarn build:scripts
yarn build:update-index

dev: build
yarn dev
Expand All @@ -15,7 +15,7 @@ test: build
yarn test

clean:
rm -r node_modules lib
rm -r node_modules apps/docs/lib apps/docs/build apps/docs/out

.DEFAULT_GOAL := build

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ let loader: ReactRouter.Loader.t<loaderData> = async ({request}) => {
let default = () => {
let {compiledMdx, entries, filePath, categories} = ReactRouter.useLoaderData()

let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${filePath}`
let docsAppRoot = "apps/docs"
let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${docsAppRoot}/${filePath}`

<>
<CommunityLayout categories entries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ let loader: ReactRouter.Loader.t<loaderData> = async ({request}) => {
let default = () => {
let {compiledMdx, entries, title, description, filePath} = ReactRouter.useLoaderData()

let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${filePath}`
let docsAppRoot = "apps/docs"
let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${docsAppRoot}/${filePath}`

let categories: array<SidebarLayout.Sidebar.Category.t> = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ let default = () => {
},
}

let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${filePath}`
let docsAppRoot = "apps/docs"
let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${docsAppRoot}/${filePath}`

let activeToc = {TableOfContents.title, entries}

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ let default = () => {
},
}

let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${filePath}`
let docsAppRoot = "apps/docs"
let editHref = `https://github.com/rescript-lang/rescript-lang.org/blob/master/${docsAppRoot}/${filePath}`

let activeToc = {TableOfContents.title, entries}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ module OtherSellingPoints = {
module TrustedBy = {
@react.component
let make = () => {
let ourUsersSourcePath = "apps/docs/src/data/OurUsers.res"

<section className="mt-20 flex flex-col items-center">
<h3 className="hl-1 text-gray-80 text-center max-w-576 mx-auto">
{React.string("Trusted by our users")}
Expand All @@ -545,7 +547,7 @@ module TrustedBy = {
->React.array}
</div>
<a
href="https://github.com/rescript-lang/rescript-lang.org/blob/master/src/common/OurUsers.res"
href={`https://github.com/rescript-lang/rescript-lang.org/blob/master/${ourUsersSourcePath}`}
>
<Button> {React.string("Add Your Logo")} </Button>
</a>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading