Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ in **MDXv3**.

## Build & Development

| Command | Purpose |
| ------------------------ | ------------------------------------------ |
| `yarn install` | Install dependencies |
| `yarn start` | Start dev server at localhost:3000 |
| `yarn build` | Production build |
| `yarn format` | Auto-format with Prettier |
| `yarn check` | Run all checks (formatting, spelling, frontmatter, types, redirects) |
| `yarn check:formatting` | Prettier validation |
| `yarn check:spelling` | CSpell spell check |
| `yarn check:frontmatter` | Validate required frontmatter keys |
| `yarn check:types` | TypeScript type check |
| `yarn check:redirects` | Validate redirect rules |
| Command | Purpose |
| -------------------------- | ------------------------------------------ |
| `npm install` | Install dependencies |
| `npm start` | Start dev server at localhost:3000 |
| `npm run build` | Production build |
| `npm run format` | Auto-format with Prettier |
| `npm run check` | Run all checks (formatting, spelling, frontmatter, types, redirects) |
| `npm run check:formatting` | Prettier validation |
| `npm run check:spelling` | CSpell spell check |
| `npm run check:frontmatter`| Validate required frontmatter keys |
| `npm run check:types` | TypeScript type check |
| `npm run check:redirects` | Validate redirect rules |

**Node.js >= 20** and **Yarn Classic (1.x)** are required.
**Node.js >= 20** is required.

## CI Checks

All PRs to `development` and `production` run:

1. **Build** - Full Docusaurus build (`yarn build`)
1. **Build** - Full Docusaurus build (`npm run build`)
2. **Lint** - Frontmatter, types, formatting, spelling
3. **Redirects** - Validates `static/_redirects` against changed files

Expand Down
6 changes: 3 additions & 3 deletions .github/instructions/markdown.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ image: /img/robots/leo/integrations/example/image.webp

Optional fields: `id`, `sidebar_position`, `slug`, `unlisted`, `toc_max_heading_level`.

Validated by `yarn check:frontmatter` in CI.
Validated by `npm run check:frontmatter` in CI.

## Images

Expand Down Expand Up @@ -105,7 +105,7 @@ Do not leave sections empty. If a section is unfinished, it must contain a `{/*

## Redirects

When renaming or moving a page, add a redirect rule to `static/_redirects` (Cloudflare format: `old-path new-path 301`). Validated by `yarn check:redirects` in CI.
When renaming or moving a page, add a redirect rule to `static/_redirects` (Cloudflare format: `old-path new-path 301`). Validated by `npm run check:redirects` in CI.

## Versioning

Expand All @@ -116,7 +116,7 @@ When renaming or moving a page, add a redirect rule to `static/_redirects` (Clou

## Spelling

New technical terms (ROS topics, product names, etc.) must be added to the `words` array in `cspell.json`. Validated by `yarn check:spelling` in CI.
New technical terms (ROS topics, product names, etc.) must be added to the `words` array in `cspell.json`. Validated by `npm run check:spelling` in CI.

## Templates

Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,40 @@ on:
- production
- development

jobs:
jobs:
build-website:
name: Build website
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v5
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: yarn install --frozen-lockfile
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Cache Docusaurus build artifacts
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
.docusaurus
build
key: docusaurus-build-${{ hashFiles('docusaurus.config.js', 'src/**/*', 'docs/**/*') }}
key: docusaurus-build-${{ hashFiles('docusaurus.config.ts', 'src/**/*', 'docs/**/*', 'package-lock.json') }}
restore-keys: |
docusaurus-build-

- name: Test build website
run: yarn build
run: npm run build
24 changes: 16 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,39 @@ on:
jobs:
lint:
name: Lint
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v5
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: yarn install --frozen-lockfile
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Check Frontmatter keys
run: yarn check:frontmatter
run: npm run check:frontmatter

- name: Check Types
if: success() || failure()
run: yarn check:types
run: npm run check:types

- name: Check Formatting
if: success() || failure()
run: yarn check:formatting
run: npm run check:formatting

- name: Check spelling
if: success() || failure()
run: yarn check:spelling
run: npm run check:spelling
20 changes: 13 additions & 7 deletions .github/workflows/redirects-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,30 @@ on:
jobs:
check-redirects:
name: Check docs redirects
timeout-minutes: 10
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v5
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: yarn install --frozen-lockfile
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Run redirects check
run: |
git fetch origin ${{ github.base_ref }}
yarn check:redirects -- --base origin/${{ github.base_ref }}
run: npm run check:redirects -- --base origin/${{ github.base_ref }}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"js/ts.tsdk.path": "node_modules\\typescript\\lib"
}
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Ensure the following tools are installed on your local machine:
- Code editor ([Visual Studio Code](https://code.visualstudio.com/) is
recommended)
- [Node.js](https://nodejs.org/en/)
- [Yarn 1.22.22 (Classic)](https://classic.yarnpkg.com/en/)
- [Git](https://git-scm.com/)
- A web browser

Expand Down Expand Up @@ -56,13 +55,13 @@ By default, `development` branch is selected. To create new branch see
After cloning the repository, open the folder in VS Code and run:

```
yarn install
npm install
```

To start the development environment, use:

```
yarn start
npm start
```

A new browser tab will open at http://localhost:3000, reflecting any changes
Expand All @@ -73,13 +72,13 @@ made to the files.
To update Docusaurus correctly, execute the following command:

```
yarn upgrade @docusaurus -L
npm update @docusaurus
```

Next, remove the `yarn.lock` file along with the `node_modules` and `build` directories. After deletion, regenerate the necessary files with updated dependency versions by running:
Next, remove the `package-lock.json` file along with the `node_modules` and `build` directories. After deletion, regenerate the necessary files with updated dependency versions by running:

```
yarn install
npm install
```


Expand Down Expand Up @@ -131,14 +130,14 @@ After making changes, test the compiled code in the browser.
Finally, check the spelling and formatting:

```
yarn formatcheck
npm run check:formatting
```

This will list files requiring formatting changes, which you can fix manually.
To fix formatting automatically, use:

```
yarn format
npm run format
```

<!-- prettier-ignore -->
Expand All @@ -156,7 +155,7 @@ search bar.
To check spelling, run:

```
yarn spellcheck
npm run check:spelling
```

This will list unrecognized words in markdown files, which you must correct
Expand Down
3 changes: 3 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"distrobox",
"Dynamixel",
"EEPROM",
"EOL",
"eProsima",
"FBHCS",
"FBHTS",
Expand Down Expand Up @@ -97,6 +98,8 @@
"NMEA",
"occdist",
"odometry",
"OLO",
"olorobotics",
"phantomx",
"PHTS",
"picamera",
Expand Down
Loading