Skip to content

Strip trailing slash from the blog URL

G-J van Rooyen requested to merge gvrooyen/scriptorium:trunk into trunk

If blog_url has a trailing slash in the arguments to defaults.default_config(), uri_parse will set path to "/", which leads to root in the path configuration also becoming "/". In the sample configuration blog_url is "https://my.blog.example/". This leads to hrefs in the output that look like the following:

<link href="//css/normalize.css" rel="stylesheet">

which do not resolve correctly in the browser. The suggested solution is to strip a trailing slash from the blog URL, if present.

Merge request reports