naver / jsdoc-to-mdx

jsdoc to mdx API document generator
https://naver.github.io/jsdoc-to-mdx/
MIT License
20 stars 5 forks source link

Sidebar is not using configuration prefix #10

Open selankon opened 1 year ago

selankon commented 1 year ago

With this config file

{
  "locales": [],
  "outDir": "./docs",
  "localesDir": "./docs/i18n/{locale}/docusaurus-plugin-content-docs/current/sdk",
  "sidebar": "./docs",
  "prefix": "sdk/",
  "jsdoc": "./jsdoc.json"
}

The generated sidebar is called: sidebars-api.js and the generated is:

module.exports = {
  "api": [
    {
      "type": "category",
      "label": "Class",
      "items": [
        "sdk/AccountAPI",
        "sdk/CensusAPI",
//...

Note that for the menu and for the name of the sidebar is using de api prefix. But for the items is using sdk which is correct.

I didn't found where to config this.

WoodNeck commented 1 year ago

There're no options for that, for now. I can add the option to change that name if needed, but I want to ask something before that as I have to test something. Does changing api to sdk make any different output on the document page?

selankon commented 1 year ago

It not make any different output, so I adapted my code to work with this names

WoodNeck commented 1 year ago

I'll add the option in the future update, thanks for the suggestion :)