diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/subpages.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/subpages.lua b/scripts/subpages.lua index 95f68f5..d77759d 100644 --- a/scripts/subpages.lua +++ b/scripts/subpages.lua | |||
| @@ -9,13 +9,15 @@ function meta(meta) | |||
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | function image(el) | 11 | function image(el) |
| 12 | if path.is_relative(el.src) then el.src = siteUrl .. path.join({ namespace, el.src }) end | 12 | if path.is_relative(el.src) and not el.src:match("^https?://") then |
| 13 | el.src = siteUrl .. path.join({ namespace, el.src }) | ||
| 14 | end | ||
| 13 | 15 | ||
| 14 | return el | 16 | return el |
| 15 | end | 17 | end |
| 16 | 18 | ||
| 17 | function link(el) | 19 | function link(el) |
| 18 | if path.is_relative(el.target) then | 20 | if path.is_relative(el.target) and not el.target:match("^https?://") then |
| 19 | el.target = siteUrl .. path.join({ namespace, el.target }) | 21 | el.target = siteUrl .. path.join({ namespace, el.target }) |
| 20 | end | 22 | end |
| 21 | 23 | ||
