diff options
-rw-r--r-- | _plugins/relativize_url.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/_plugins/relativize_url.rb b/_plugins/relativize_url.rb index b7df362..d419032 100644 --- a/_plugins/relativize_url.rb +++ b/_plugins/relativize_url.rb @@ -1,5 +1,9 @@ require 'pathname' +def ensure_leading_slash(path) + path[0..0] == "/" ? path : "/#{path}" +end + module Jekyll module UrlRelativizer def relativize_url(input) |