Skip to content

[WIP] docs: switched API docs to typedoc and starlight-typedoc #5326

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Apr 8, 2025

PR Checklist

Overview

Very much a draft WIP. Both the current docdash/jsdoc docs and the new TypeDoc generators generate some wacky code. My hope is we can clean up the current docs to be better for both.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to switch the API documentation generation to Typedoc and integrate the starlight-typedoc plugin in order to improve the generated docs.

  • Introduces a new Typedoc configuration in typedoc.json.
  • Updates JSDoc comments in lib/mocha.js to utilize generics annotations.
  • Upgrades documentation dependencies and adapts the Astro configuration to support the new docs generation and sidebar structure.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
typedoc.json Adds a configuration file to generate API docs using Typedoc.
lib/mocha.js Updates JSDoc comments by specifying a template for parameter types.
docs-next/package.json Updates dependency versions and adds the starlight-typedoc package.
docs-next/astro.config.ts Integrates starlightTypeDoc into the Astro config and updates the sidebar and social links.
docs-next/.gitignore Ignores the generated API docs folder.
Comments suppressed due to low confidence (2)

docs-next/astro.config.ts:21

  • Consider adding a comment explaining the starlightTypeDoc configuration settings to improve clarity and maintainability.
plugins: [
        starlightTypeDoc({
          entryPoints: ["../lib/mocha.js"],
          sidebar: {
            collapsed: true,
          },
          tsconfig: "../tsconfig.json",
        }),
      ],

docs-next/astro.config.ts:126

  • [nitpick] Confirm that replacing the API link with a Discord link aligns with the intended user experience, and if so, consider documenting this design decision.
icon: "discord",
          label: "Discord",
          href: "https://discord.gg/KeDn2uXhER",

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.

📝 Docs: Migrate /api docs or an equivalent from the old site to the new one
1 participant