2016-03-18 11:04:22 +01:00
|
|
|
{% capture before %}{{ include.link[1] | split: "://" | first }}{% endcapture %}
|
2017-10-03 22:21:54 +02:00
|
|
|
{% capture after %}{{ include.link[1] | split: "://" | last }}{% endcapture %}
|
2016-03-18 11:04:22 +01:00
|
|
|
{% assign internal = true %}
|
|
|
|
{% if before != after %}
|
|
|
|
{% if before == "http" or before == "https" %}
|
|
|
|
{% assign internal = false %}
|
2017-10-03 22:21:54 +02:00
|
|
|
{% endif %}
|
2016-03-18 11:04:22 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if internal %}
|
2019-06-08 07:34:33 +02:00
|
|
|
{% capture linkurl %}{{ include.link[1] | relative_url }}{% endcapture %}
|
2016-03-18 11:04:22 +01:00
|
|
|
{% else %}
|
|
|
|
{% capture linkurl %}{{ include.link[1] }}{% endcapture %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<a href="{{ linkurl }}">{{ include.link[0] }}</a>
|