mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Avoid rewriting protocol related links.
This commit is contained in:
parent
282730e635
commit
4d0e18db23
1 changed files with 3 additions and 2 deletions
|
|
@ -158,8 +158,9 @@ class Writer(object):
|
||||||
relative_paths.append(found)
|
relative_paths.append(found)
|
||||||
|
|
||||||
for relative_path in relative_paths:
|
for relative_path in relative_paths:
|
||||||
if not relative_path.startswith("http://"):
|
if not "://" in relative_path: # we don't want to rewrite protocols
|
||||||
dest_path = os.sep.join((get_relative_path(name), "static", relative_path))
|
dest_path = os.sep.join((get_relative_path(name), "static",
|
||||||
|
relative_path))
|
||||||
content = content.replace(relative_path, dest_path)
|
content = content.replace(relative_path, dest_path)
|
||||||
|
|
||||||
return content
|
return content
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue