PeterWhittaker/PeterWhittaker.github.io

Write a brief blog post re {{ site.baseurl }} being broken when followed by a variable that begins with slash, such as {{ post.url }}

Closed this issue · 2 comments

Which is broken? The variable, or the use of it? Hard to say.

Discuss.

Refer to #27. When using {{ site.baseurl }}, be very careful when it begins an href and is followed by either a variable or a string that starts with a /: This can result in href="//...", which starts a host name, and not href="/[^/...", which refers to something on the current site.

Bwa.

This made sense back then, but not anymore: As documented in this post, GitHub Pages recommends not using {{ site.baseurl }}, etc.