Skip to content

Fix: base class metadata lost for API pages #13842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mohiuddin-khan-shiam
Copy link

What was wrong

apiDetails.baseClass in website/pages/[...listPathPage].tsx 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:

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.

odiomarcelino and others added 2 commits June 29, 2025 22:51
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 <[email protected]>
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants