-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix naive handling of relative links when proofing (#75)
This commit fixes naive handling of relative links when proofing. The problem here was the assumption that a relative link of foo.html that was coming from a file at bar/fubar.md in the filesystem would always appear at bar/foo.html. That is not always true. If directory_urls was on, then it wasn't true. Thus, #46. It was also not true when using relative links between blog posts when using the mkdocs material blog plugin. This commit changes the relative url lookup logic to be more robust and in the process make the proofer work with both the mkdocs material blog plugin and with directory_urls on. It does this by storing additional information in the lookup files that we use to find information about pages. We can now look up a file by its src_uri entry, for example blog/posts/index.md and then use that to get the dest_uri like blog/12/10/some-post/ and then use that dest_uri value to robustly handle figuring out where a relative link is pointing. Closes #46 Closes #70
- Loading branch information
1 parent
14c97cc
commit 5776fea
Showing
4 changed files
with
104 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters