Properly apply relative_url
filter to internal links in header overlay actions
array
This commit is contained in:
@ -54,7 +54,12 @@
|
||||
{% if page.header.actions %}
|
||||
<p>
|
||||
{% for action in page.header.actions %}
|
||||
<a href="{{ action.url }}" class="btn btn--light-outline btn--large">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
|
||||
{% if action.url contains "://" %}
|
||||
{% assign url = action.url %}
|
||||
{% else %}
|
||||
{% assign url = action.url | relative_url %}
|
||||
{% endif %}
|
||||
<a href="{{ url }}" class="btn btn--light-outline btn--large">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user