timvink/mkdocs-enumerate-headings-plugin

[Question] How to exclude an entire directory but the index.md inside it?

Opened this issue · 0 comments

Hello,

I have a directory structure that looks something like that:

docs:
  - index.md
  - file1.md
  - sub-directory
    - index.md
    - sub-file1.md
    - sub-file2.md
    - sub-file3.md
  - file2.md
  - file3.md

My mkdocs config looks like that:

plugins:
  - enumerate-headings:
      exclude:
        - sub-directory/*
      include:
        - sub-directory/index.md

What I try to achieve is to get my headings enumerated like that:

docs:
  - index.md        1
  - file1.md        2
  - sub-directory
    - index.md      3
    - sub-file1.md
    - sub-file2.md
    - sub-file3.md
  - file2.md        4
  - file3.md        5

Is that somehow possible?
Thank you for your help! :)