docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
Strip markdown syntax from frontmatter
Describe the bug
When rendering a DocCard, the frontmatter description is used - https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx#L80-L86
This plugin currently puts markdown into the frontmatter, the DocCard component does not transform markdown to HTML so markdown syntax is rendered.
Expected behavior
Frontmatter is not generated with markdown syntax
frontmatter: Endpoint used to get a Profile
Current behavior
Frontmatter has markdown in it
frontmatter: Endpoint used to get a [Profile](./path/to/profile)
Possible solution
None
This splitDescription method is used throughout createItems. I guess stripping with something like this might work
Steps to reproduce
- Clone https://github.com/omonk/spec-render-bug
git checkout frontmatter-markdown- http://localhost:3002/docs/test-spec/update
- See DocCard is rendered with
getdescription
Screenshots
Context
It looks unprofessional