Function to indicate whether the given URL is an external URL.
Become a backer or sponsor to support our work.
The function accepts an URL, and return a boolean value indicates whether the given URL is an external URL.
1{{ $url := "https://example.com" }}
2{{ if partial "base/functions/is-url-external" $url }}
3 <a href="{{ $url }}" target="_blank" rel="external">OPEN IN NEW TAB</a>
4{{ end }}