15 ms·
Thank you for your question, I don't have experience with Docusaurus but I'll try to list a few ideas, let me know if it can help you. If you only need raw pac
by velut 5y ago
Thank you for your question, I don't have experience with Docusaurus but I'll try to list a few ideas, let me know if it can help you.
If you only need raw package metatada (signatures, docs...) that Docusaurus will render somehow at build time you may use my extractor which outputs a plain Javascript object with the collected information (see https://github.com/jsdocs-io/extractor/blob/main/test/package-snapshots/__snapshots__/query-registry.test.ts.snap https://github.com/jsdocs-io/extractor/blob/main/test/packag...).
If you need pre-rendered docs that Docusaurus will embed in a page you may implement something like a React component (see https://github.com/jsdocs-io/web/blob/main/src/components/package/PackageDeclarationSection.tsx https://github.com/jsdocs-io/web/blob/main/src/components/pa...) and use the raw metadata as component props.
If you need a pre-rendered page that Docusaurus will collect, you may want to look into https://www.npmjs.com/package/@microsoft/api-extractor https://www.npmjs.com/package/@microsoft/api-extractor which can directly output Markdown files (as well as JSON files) but requires some initial setup to get working.