Skip to content

Commit

Permalink
support RELATIVE_URLS
Browse files Browse the repository at this point in the history
  • Loading branch information
mortada committed Aug 19, 2015
1 parent 472d684 commit 58e7335
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pelican_javascript.py
Expand Up @@ -51,7 +51,10 @@ def add_files(gen, metadata):
if f.startswith('http://') or f.startswith('https://'):
link = f
else:
link = "%s/%s/%s" % (site_url, dirnames[key], f)
if gen.settings['RELATIVE_URLS']:
link = "%s/%s" % (dirnames[key], f)
else:
link = "%s/%s/%s" % (site_url, dirnames[key], f)
html = formatters[key].format(link)
htmls.append(html)
metadata[key] = htmls
Expand Down

0 comments on commit 58e7335

Please sign in to comment.