~xdavidwu/xdavidwu.link

d57c3d97d8795ff82f8ce96472504e438b8e182d — Michael Rose 5 years ago 68aa5f7
Properly apply `relative_url` filter to internal links in header overlay `actions` array
2 files changed, 10 insertions(+), 1 deletions(-)

M CHANGELOG.md
M _includes/page__hero.html
M CHANGELOG.md => CHANGELOG.md +4 -0
@@ 4,6 4,10 @@

- 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)

### Enhancements

M _includes/page__hero.html => _includes/page__hero.html +6 -1
@@ 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>