diff --git a/nikola/nikola.py b/nikola/nikola.py index 48aa8cef42..582090f3e9 100644 --- a/nikola/nikola.py +++ b/nikola/nikola.py @@ -33,6 +33,7 @@ import logging import operator import os +import pathlib import sys import mimetypes from collections import defaultdict @@ -1926,7 +1927,8 @@ def path(self, kind, name, lang=None, is_link=False, **kwargs): else: return link else: - return os.path.join(*path) + # URLs should always use forward slash separators, even on Windows + return pathlib.PurePosixPath(*path) def post_path(self, name, lang): """Link to the destination of an element in the POSTS/PAGES settings.