mirror of
https://github.com/explosion/spaCy.git
synced 2026-01-12 11:41:10 +03:00
What was wrong
`apiDetails.baseClass` in [website/pages/[...listPathPage].tsx](cci:7://file:///c:/Users/T2430514/Downloads/spaCy/website/pages/%5B...listPathPage%5D.tsx:0:0-0:0) was hard-coded to `null`, ignoring the `api_base_class` and `api_base_class_title` values provided in page front-matter.
As a result, API reference pages could not render “extends …” information or generate correct cross-links, hurting usability and discoverability of the docs.
## How it’s fixed
The placeholder line was replaced with real logic:
```ts
const baseClass = mdx.frontmatter.api_base_class
? {
title: mdx.frontmatter.api_base_class_title ?? mdx.frontmatter.title,
slug: mdx.frontmatter.api_base_class,
}
: null;
```
apiDetails.baseClass now receives this object, allowing the UI to show accurate base-class data whenever it’s supplied, while still defaulting to null when it isn’t.
Co-Authored-By: S. M. Mohiuddin Khan Shiam <147746955+mohiuddin-khan-shiam@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| models | ||
| universe | ||
| _app.tsx | ||
| _document.tsx | ||
| [...listPathPage].tsx | ||
| 404.js | ||
| index.tsx | ||