mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user