Skip to content
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

docs: enhance how references are generated #5805

Merged
merged 15 commits into from
Dec 5, 2023

Conversation

shahednasser
Copy link
Member

What

Previously, we generated references in isolation of one another. This resulted in many duplicate pages in our documentation. For example, if an element in the JS Client references an entity, it creates a new documentation page for that entity rather than use the existing entities documentation.

The change introduced by this PR changes the process of generating references so it's no longer done in isolation. The changes include:

  • Generating a general reference for the medusa and types packages, as most other references/packages depend on items imported from these packages. This ensures that other references don't create new documentation for items within those packages.
  • Change the Typedoc configurations of references to generate a JSON reference rather than directly generate the documentation.
  • Create a _merger Typedoc configuration that generates a merged documentation from the JSON references of other references.
  • Change how the generate:references script works by running the merger configuration after all specified references are generated.

References are also re-generated in this PR to resolve any possible errors arising in the documentation.

@shahednasser shahednasser requested review from a team as code owners December 5, 2023 12:59
Copy link

changeset-bot bot commented Dec 5, 2023

⚠️ No Changeset found

Latest commit: e1b581d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference 🛑 Canceled (Inspect) Dec 5, 2023 1:18pm
docs-ui 🛑 Canceled (Inspect) Dec 5, 2023 1:18pm
medusa-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2023 1:18pm

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.

None yet

1 participant