-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Windows compatibility #47
Conversation
The build would fail if * a page contains an internal hyperlink * and, the target page path, in the pages config, uses a different directory separator than the one native to the platform
On Windows a path such as about/license.md would yield the the url about/license\ this had an effect on the creation of relative paths . Resources such as css and js, as well as internal hyperlinks, would get incorrect urls.
@@ -25,7 +25,7 @@ def __call__(self, match): | |||
# If the site navigation has been provided, then validate | |||
# the internal hyperlink, making sure the target actually exists. | |||
target_file = self.nav.file_context.make_absolute(path) | |||
if not target_file in self.nav.source_files: | |||
if not 'target_file' in map(os.path.normpath, self.nav.source_files): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'taget_file' shouldn't be quoted here.
Can you explain the usage of map
here - it's not immediately obvious to me what it's for so it probably needs a comment or some other explanation.
I don't know why I have put target_file in quotes, but it's definitely never going to work like that. I'll remove the quotes and add a comment later today. |
Great, thanks @terkill. |
I've not been able create any tests which ensures platform compatibility. The only way I can figure is to run the tests on the supported platforms. But I might very well be wrong; my python experience is limited to the few lines I've written here. |
Whoops, I didn't notice this pull request before working on Windows support this weekend. :) See also #97, which does the minimum needed for me to install on Windows -- and includes a HOWTO for a free-for-OSS Windows-based CI service. |
As per this comment, I'm going to close this for now. |
Wait not sure about that one - this seems valid? |
ah, good point, I miss-read this when scanning the issues. Looks like it needs a rebase tho' |
Closing due to pull request being out of date. Happy to consider any up to date PRs dealing with this issue. |
Fixes some cross platform issues.