mkdocs-jupyter icon indicating copy to clipboard operation
mkdocs-jupyter copied to clipboard

include but ignore

Open asher-pembroke opened this issue 2 years ago • 0 comments

Consider the following setup, where I want to include just one notebook but ignore all the others

plugins:
  - mkdocs-jupyter:
      include:
        - want_to_include.ipynb
      ignore:
        - "*.ipynb"

The following lines cause both of these conditions to match, so the file is not included

https://github.com/danielfrg/mkdocs-jupyter/blob/d751a767628f95284738a0423bbeeced37dba3a1/mkdocs_jupyter/plugin.py#L63

As a workaround, I've tried excluding files explicitly, but all subdirectories have to be named since pattern matching happens right to left: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.match

If there is an easier way to do this, please elaborate in the README.

asher-pembroke avatar Jul 22 '22 17:07 asher-pembroke