typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
725 stars 177 forks source link

[docusaurus-plugin-typedoc] `outputFileStrategy` option from `typedoc-plugin-markdown` #570

Closed SalahAdDin closed 9 months ago

SalahAdDin commented 9 months ago

We are using Docusaurus for handling our documentation and Typedoc for generating the API documentation.

Now, when we add outputFileStrategy property to the typedoc.config.cjs file, we have an issue:

    ~/Projects/TRT/twe_fe_next/docs    main +11 !3 ?5  pnpm start                                                                             ✔  13m 1s  

> docs@0.0.0 start /home/luisalaguna/Projects/TRT/twe_fe_next/docs
> docusaurus start

[INFO] Starting the development server...
[info] Loaded plugin typedoc-plugin-merge-modules
[info] Loaded plugin typedoc-plugin-missing-exports
[info] Loaded plugin typedoc-plugin-markdown
[error] Tried to set an option (outputFileStrategy) that was not declared. You may have meant:
        pretty
        entryPointStrategy
        out
        options
        sort
[error] Documentation could not be generated due to the errors above.
[SUCCESS] Docusaurus website is running at: http://localhost:3000/

The typedoc.config.cjs is as follows:

/** @type { import('typedoc').TypeDocOptionMap & import('typedoc-plugin-merge-modules').Config } */

const config = {
  out: "api",
  entryPointStrategy: "expand",
  entryPoints: ["../src"],
  tsconfig: "../tsconfig.json",
  plugin: [
    "typedoc-plugin-merge-modules",
    "typedoc-plugin-missing-exports",
    "typedoc-plugin-markdown",
  ],
  excludeExternals: true,
  mergeModulesRenameDefaults: true,
  mergeModulesMergeMode: "project",
  // outputFileStrategy: "members",
};

module.exports = config;

What's the issue here?

tgreyuk commented 9 months ago

What version of typedoc-plugin-markdown are you using?

SalahAdDin commented 9 months ago

What version of typedoc-plugin-markdown are you using?

Here there are:

  "dependencies": {
    "@docusaurus/core": "3.1.1",
    "@docusaurus/plugin-ideal-image": "3.1.1",
    "@docusaurus/preset-classic": "3.1.1",
    "@docusaurus/theme-live-codeblock": "3.1.1",
    "@docusaurus/theme-mermaid": "3.1.1",
    "@mdx-js/react": "3.0.0",
    "clsx": "2.0.0",
    "docusaurus-plugin-typedoc": "0.22.0",
    "prism-react-renderer": "2.3.0",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "typedoc": "0.25.7",
    "typedoc-plugin-markdown": "3.17.1",
    "typedoc-plugin-merge-modules": "5.1.0",
    "typedoc-plugin-missing-exports": "2.2.0"
  },
tgreyuk commented 9 months ago

Ah ok - for that option you require @next versions. See https://www.typedoc-plugin-markdown.org/integrations/docusaurus/quick-start.

SalahAdDin commented 9 months ago

Ah ok - for that option you require @next versions. See https://www.typedoc-plugin-markdown.org/integrations/docusaurus/quick-start.

Yeah, you are right, thank you!!!