Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'mkdocs serve' bug - issue #45 #46

Merged
merged 6 commits into from
May 7, 2022
Merged

Fix 'mkdocs serve' bug - issue #45 #46

merged 6 commits into from
May 7, 2022

Conversation

mchaaler
Copy link
Contributor

@mchaaler mchaaler commented Apr 11, 2022

Fix 'mkdocs serve' bug - replace startswith by conversion to pathlib object + relative_to() method

Fixes #45

@smarie
Copy link
Owner

smarie commented Apr 11, 2022

Nice ! thanks @mchaaler. I have doubts that this actually does the entire job (it fixes the error but may trigger additional useless builds)

@mchaaler
Copy link
Contributor Author

Manual test is OK:
✅ run mkdocs serve
✅ modify a file in the source dir: it should update the site
✅ modify a file in the doc/generated/gallery files: it should not trigger a site recreate, since the path is in excluded_dirs

src/mkdocs_gallery/utils.py Outdated Show resolved Hide resolved
tests/test_utils.py Outdated Show resolved Hide resolved
@smarie
Copy link
Owner

smarie commented May 7, 2022

Thanks so much for your efforts and patience @mchaaler !
Times have been complicated for me lately in terms of bandwidth for such project. I made a minor suggestion, moving from ValueError to TypeError when the type of paths objects in not Path. I'll merge when the build is complete

@smarie smarie merged commit e9c30e3 into smarie:main May 7, 2022
@smarie
Copy link
Owner

smarie commented May 7, 2022

done! thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: startswith first arg must be str or a tuple of str, not WindowsPath
2 participants