Avoid copying all files in the root directory
ariciputi opened this issue · comments
As far as I can understand portray copies all the files found in the root directory no matter their extension. Then MkDocs doesn't make any selection among the file copied over to the site directory because of early design reasons. The result of this is that if I try to use portray within any of my projects I end up with a site
directory full of files that are not related to the documentation at all (e.g. poetry.toml
, poetry.lock
, pyproject.toml
and whatnot).
I was wondering if you would be keen on adding any kind of implicit or explicit filter to avoid this. As an implicit filter portray
could be changed to include only markdown files from root_dir (selecting on the file extension). On the other hand if you prefer an explicit filter (as I do) a new configuration parameter can be introduced to control which files to include/exclude via the pyproject.toml
settings and some globbing, being the default to copy over any file as it is now.
If you think you could accept a PR to add this kind of feature, I would be more than happy to help. Please let me know.
Thanks for your effort in this project.
Closing this now as I've merged in your PR, thank you for your contribution!
~Timothy