Windows: Use posixpath in nav.FC.make_absolute()

nav.FileContext.make_absolute() is only used to compare
links to entries in mkdocs.yml, so it makes sense for it
to only use POSIX-style paths.

Without this, the site fails to build because it checks for
a Windows-style path in a list of POSIX paths in
build.PathToURL.__call__().

This is the last change required to build the mkdocs site
on Windows.
This commit is contained in:
Ed Brannin
2014-08-14 16:22:41 -04:00
parent 41f484c9e5
commit 90d8710478

View File

@@ -113,10 +113,10 @@ class FileContext(object):
def make_absolute(self, path):
"""
Given a relative file path return it as a absolute filepath,
given the context of the current page.
Given a relative file path return it as a POSIX-style
absolute filepath, given the context of the current page.
"""
return os.path.normpath(os.path.join(self.base_path, path))
return posixpath.normpath(posixpath.join(self.base_path, path))
class Page(object):