The Lynx documentation relies on a structured system to ensure API references are accurate and consistent.
lynx-compat-data)The source of truth for platform compatibility is stored in packages/lynx-compat-data. This is a JSON database similar to MDN's browser-compat-data.
packages/lynx-compat-data.lynx-api/global/console/log.json).To display a compatibility table in your documentation, use the <APITable> component.
It is recommended to define the api field in the frontmatter.
Then place <APITable /> in your MDX file. It will automatically read the api field.
When you need to display multiple tables on a single page, you can pass the query prop explicitly.
For example, in fetch, separate tables are used for Headers, Request, and Response:
LCD tables only load in the browser
You can verify valid queries using the Interactive Explorer below.
For a high-level view of API groups (like methods, properties, events), use <APISummary>. Similar to <APITable>, it defaults to reading from the api frontmatter field.
You can use the explorer below to find valid API queries and preview their tables.
LCD tables only load in the browser
We provide a script to ensure your API documentation matches the compatibility data.
This script (scripts/check_api_doc) checks for:
api frontmatter keys.API reference pages are automatically generated from TypeScript source code using TypeDoc.
scripts/typedoc/pnpm run typedocDo not manually edit files generated by TypeDoc (usually in docs/en/api/...), as they will be overwritten. Edit the source comments instead.