Properly apply relative_url
filter to internal links in header overlay actions
array
This commit is contained in:
parent
90f5a98406
commit
a95fae0155
4 changed files with 16 additions and 4 deletions
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
- Remove deprecated `base_path` include helper.
|
- Remove deprecated `base_path` include helper.
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Properly apply `relative_url` filter to internal links in header overlay `actions` array.
|
||||||
|
|
||||||
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
@ -54,7 +54,12 @@
|
||||||
{% if page.header.actions %}
|
{% if page.header.actions %}
|
||||||
<p>
|
<p>
|
||||||
{% for action in page.header.actions %}
|
{% 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 %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@ permalink: /docs/history/
|
||||||
excerpt: "Change log of enhancements and bug fixes made to the theme."
|
excerpt: "Change log of enhancements and bug fixes made to the theme."
|
||||||
sidebar:
|
sidebar:
|
||||||
nav: docs
|
nav: docs
|
||||||
last_modified_at: 2018-09-11T09:58:11-04:00
|
last_modified_at: 2018-09-11T11:42:10-04:00
|
||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -14,6 +14,10 @@ toc: true
|
||||||
|
|
||||||
- Remove deprecated `base_path` include helper.
|
- Remove deprecated `base_path` include helper.
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Properly apply `relative_url` filter to internal links in header overlay `actions` array.
|
||||||
|
|
||||||
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
## [4.13.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.13.0)
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
|
@ -7,10 +7,9 @@ header:
|
||||||
overlay_color: "#000"
|
overlay_color: "#000"
|
||||||
overlay_filter: "0.5"
|
overlay_filter: "0.5"
|
||||||
overlay_image: /assets/images/unsplash-image-1.jpg
|
overlay_image: /assets/images/unsplash-image-1.jpg
|
||||||
cta_label: "Download"
|
|
||||||
actions:
|
actions:
|
||||||
- label: "Learn More"
|
- label: "Learn More"
|
||||||
url: "https://github.com/mmistakes/minimal-mistakes/"
|
url: "/terms/"
|
||||||
caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
|
caption: "Photo credit: [**Unsplash**](https://unsplash.com)"
|
||||||
excerpt: "Bacon ipsum dolor sit amet salami ham hock ham, hamburger corned beef short ribs kielbasa biltong t-bone drumstick tri-tip tail sirloin pork chop."
|
excerpt: "Bacon ipsum dolor sit amet salami ham hock ham, hamburger corned beef short ribs kielbasa biltong t-bone drumstick tri-tip tail sirloin pork chop."
|
||||||
intro:
|
intro:
|
||||||
|
|
Loading…
Reference in a new issue