Refactors the YAML loading logic in update_mkdocs_yml to first attempt strict safe_load, and only fall back to a custom loader if Python tags are present. This makes the validation stricter and only relaxes it when necessary for mkdocs-specific tags.
Adds a custom SafeLoader to handle the !!python/name:pymdownx.superfences.fence_code_format tag during YAML validation, preventing errors when validating mkdocs.yml files that use this extension.
Adds a custom SafeLoader to tolerate !!python/name tags in mkdocs.yml, allowing validation of YAML files that use MkDocs or pymdownx extensions without executing code.
* Normalize path separators in navigation links
Replaces backslashes with forward slashes in relative paths when generating navigation items to ensure consistency across different operating systems.
* Fix URL encoding and path normalization in build script
Normalizes path separators to forward slashes for URLs and updates URL encoding to only encode spaces, preserving forward slashes. This improves the correctness of generated redirect URLs in the build process.