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

Expose utility from swingset/meta to get document list based on type and category #63

Open
BRKalow opened this issue Mar 21, 2023 · 0 comments

Comments

@BRKalow
Copy link
Contributor

BRKalow commented Mar 21, 2023

Internally, swingset distinguishes between component documentation and standalone documentation. This is evident on the generated metadata objects for each detected document:

  "text": {
    "__type": "component", // 👈 __type property represented here
    "frontmatter": {},
    "category": "default",
    "filepath": "...",
    "relativePath": "components/text/docs.mdx",
    "normalizedPath": "text",
    "componentPath": "components/text",
    "slug": "text"
  },

We should expose a method to get metadata based on the document type and category. This will allow themes to build a navigation element that has access to all available paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant