Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Add GitHub workflow for MDX format checking and fix parsing error (#10924)

Xingyao Wang8ea1259943d8
diff --git a/.github/workflows/mdx-lint.yml b/.github/workflows/mdx-lint.yml
new file mode 100644
index 0000000000..34cd0b6a18
--- /dev/null
+++ b/.github/workflows/mdx-lint.yml
@@ -0,0 +1,70 @@
+# Workflow that checks MDX format in docs/ folder
+name: MDX Lint
+
+# Run on pushes to main and on pull requests that modify docs/ files
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'docs/**/*.mdx'
+ pull_request:
+ paths:
+ - 'docs/**/*.mdx'
+
+# If triggered by a PR, it will be in the same group. However, each commit on main will be in its own unique group
+concurrency:
+ group: ${{ github.workflow }}-${{ (github.head_ref && github.ref) || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ mdx-lint:
+ name: Lint MDX files
+ runs-on: blacksmith-4vcpu-ubuntu-2204
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Node.js 22
+ uses: useblacksmith/setup-node@v5
+ with:
+ node-version: 22
+
+ - name: Install MDX dependencies
+ run: |
+ npm install @mdx-js/mdx@3 glob@10
+
+ - name: Validate MDX files
+ run: |
+ node -e "
+ const {compile} = require('@mdx-js/mdx');
+ const fs = require('fs');
+ const path = require('path');
+ const glob = require('glob');
+
+ async function validateMDXFiles() {
+ const files = glob.sync('docs/**/*.mdx');
+ console.log('Found', files.length, 'MDX files to validate');
+
+ let hasErrors = false;
+
+ for (const file of files) {
+ try {
+ const content = fs.readFileSync(file, 'utf8');
+ await compile(content);
+ console.log('βœ… MDX parsing successful for', file);
+ } catch (err) {
+ console.error('❌ MDX parsing failed for', file, ':', err.message);
+ hasErrors = true;
+ }
+ }
+
+ if (hasErrors) {
+ console.error('\\n❌ Some MDX files have parsing errors. Please fix them before merging.');
+ process.exit(1);
+ } else {
+ console.log('\\nβœ… All MDX files are valid!');
+ }
+ }
+
+ validateMDXFiles();
+ "
diff --git a/docs/usage/architecture/runtime.mdx b/docs/usage/architecture/runtime.mdx
index 06164dcef1..7e6666c006 100644
--- a/docs/usage/architecture/runtime.mdx
+++ b/docs/usage/architecture/runtime.mdx
@@ -124,7 +124,7 @@ This tagging approach allows OpenHands to efficiently manage both development an
OpenHands supports both bind mounts and Docker named volumes in SandboxConfig.volumes:
- Bind mount: "/abs/host/path:/container/path[:mode]"
-- Named volume: "volume:<name>:/container/path[:mode]" or any non-absolute host spec treated as a named volume
+- Named volume: "volume:`<name>`:/container/path[:mode]" or any non-absolute host spec treated as a named volume
Overlay mode (copy-on-write layer) is supported for bind mounts by appending ":overlay" to the mode (e.g., ":ro,overlay").
To enable overlay COW, set SANDBOX_VOLUME_OVERLAYS to a writable host directory; per-container upper/work dirs are created under it. If SANDBOX_VOLUME_OVERLAYS is unset, overlay mounts are skipped.