Using hasPrefix

In {{ if .RelPermalink "/search/ }}, using hasprefix before .RelPermalink throws an error that the function is not defined. I found the undocumented strings.HasPrefix which works. Which is the correct way to use hasprefix here? I am adding a CSS file all for all pages beginning with /search/.

it’s hasPrefix.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.