This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 5f76ad2 Roberto Alsina
committed Mar 15, 2018
1 parent 26b7695 commit 5f76ad2 Copy full SHA for 5f76ad2
File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ Features
32
32
Bugfixes
33
33
--------
34
34
35
+ * Handle '/' and other absolute paths better in POSTS / PAGES
35
36
* Support KaTeX for reST display math (Issue #2888)
36
37
* Use npm for asset management instead of bower, which was deprecated
37
38
(Issue #2790)
Original file line number Diff line number Diff line change @@ -182,14 +182,14 @@ def __init__(
182
182
# Fill default_metadata with stuff from the other languages
183
183
for lang in sorted (self .translated_to ):
184
184
default_metadata .update (self .meta [lang ])
185
-
186
185
# Compose paths
187
186
if self .folder_base is not None :
188
187
# Use translatable destination folders
189
188
self .folders = {}
190
189
for lang in self .config ['TRANSLATIONS' ].keys ():
191
- self .folders [lang ] = os .path .normpath (os .path .join (
192
- self .folder_base (lang ), self .folder_relative ))
190
+ if os .path .isabs (self .folder_base (lang )): # Issue 2982
191
+ self .folder_base [lang ] = os .path .relpath (self .folder_base (lang ), '/' )
192
+ self .folders [lang ] = os .path .normpath (os .path .join (self .folder_base (lang ), self .folder_relative ))
193
193
else :
194
194
# Old behavior (non-translatable destination path, normalized by scanner)
195
195
self .folders = {lang : self .folder_relative for lang in self .config ['TRANSLATIONS' ].keys ()}
You can’t perform that action at this time.
0 commit comments