This goes in a similar direction as the discussion in [#1341](https://github.com/mojombo/jekyll/pull/1341#pullrequestreviewcomment-5319319), partly realized [here](https://github.com/maul-esel/jekyll/compare/minor-refactors...PathHelper). It's intended for paths, but it works for URLs as well (there's scarcely any difference between a relative URL and a relative path anyway).