docgeni / docgeni

📖 A modern, powerful and out of the box documentation generator for Angular components lib and markdown docs.(现代化的、强大的、开箱即用的 Angular 组件文档生成工具)

Home Page:https://docgeni.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

菜单排序无效 与 exclude 选项无效

HyperLife1119 opened this issue · comments

Describe the bug

最小复现:https://github.com/HyperLife1119/docgeni-demo

image

  1. 我为 services/doc/en-us.md 设置了 order: 999,services 目录应该排序到最后
  2. 配置中已将 src/exclude 目录排除,但仍然被扫描到,生成了 API 文档

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

  1. 目前 include 是组件的根目录,比如指定了 src Docgeni 会把这个文件夹下的每个子文件夹当作一个组件生成文档,exclude 是排除哪个子文件夹,不需要带根目录的,只要 exclude 配置成 ['components', 'exclude'] 即可,这个后续可以做一下兼容处理,当带了根目录比如 src/exclude 也支持一下
  2. 排序目前对于 Category 分类下的组件是支持的,但是示例中没有给组件加分类,所以这是一个缺陷,我会修复,目前临时的解决方案就是把 include "src/components" 放在前面

你调整一下类库的配置为:

libs: [
    {
      name: "test-lib",
      rootDir: "projects/test-lib",
      include: [
        "src/components",
        "src"
      ],
      exclude: [
        "components",
        "exclude"
      ],
      apiMode: "automatic",
      categories: [],
    },
  ],

这样结果就符合预期:
image

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.