From 90d871047843c260efea8cabb2dde1687a55b21d Mon Sep 17 00:00:00 2001 From: Ed Brannin Date: Thu, 14 Aug 2014 16:22:41 -0400 Subject: [PATCH] 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. --- mkdocs/nav.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkdocs/nav.py b/mkdocs/nav.py index aa782073..526b3360 100644 --- a/mkdocs/nav.py +++ b/mkdocs/nav.py @@ -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):