feat(content-docs): allow custom props through _category_.json - #6780
Conversation
|
✔️ [V2] 🔨 Explore the source changes: 50d52ee 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/62233de1447eaa00073c87b1 😎 Browse the preview: https://deploy-preview-6780--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6780--docusaurus-2.netlify.app/ |
Josh-Cena
left a comment
There was a problem hiding this comment.
Sorry, we don't want to add more root config fields for categories. Could you please just make categoryMetadata.customProps be passed to the final item? The idea is that the user can swizzle DocCard and implement whatever design through custom props.
slorber
left a comment
There was a problem hiding this comment.
Agree with @Josh-Cena : we want to enable users to bring their own customization abilities, not add just 2 new premade and unflexible attributes
|
Also agree. Thanks for the feedback. After addressing the review I'm trying to resolve this error. CustomProps are not acceptable even though I added sidebar validation. |
You added validation for the sidebar item, but not for the metadata file, which has another schema |
ca32856 to
b76094e
Compare
b76094e to
1698957
Compare
|
Addressed reviews: |
Josh-Cena
left a comment
There was a problem hiding this comment.
Thanks, that looks great!
…ook#6780) * feat(content-docs): allow custom props through _category_.json * refactor * documentation Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Motivation
Close #6690
Resolve Feature Request: allow-customizing-category-description-in-generated-index-cards
Have you read the Contributing Guidelines on pull requests?
yes. but I have no idea how to test it.
Test Plan
Related PRs