Remove site.url from first breadcrumb link (#3051)

* Remove site.url from first breadcrumb link

Fixes #3050

* Use relative_rul filter instead of site.baseurl
This commit is contained in:
Erik Westrup 2021-07-23 15:23:07 +02:00 committed by GitHub
parent 3c075fe76b
commit 0491cd362b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,8 @@
{% for crumb in crumbs offset: 1 %} {% for crumb in crumbs offset: 1 %}
{% if forloop.first %} {% if forloop.first %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="{{ site.url }}{{ site.baseurl }}/" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a> <a href="{{ '/' | relative_url }}" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
<meta itemprop="position" content="{{ i }}" /> <meta itemprop="position" content="{{ i }}" />
</li> </li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span> <span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>