Hugo Replace but Ignore Case-sensitive?

With this code but without case sensitive. I want replace all word contain Esports, esports, eSports, ESports etc…

{{ $content := replace $content “Esports” “<a href="https://example.com/esports/\” >Esports" 1 }}

You could try to combine that with lower, for example

{{$content := replace (lower $content) "esports" "a href="..."> "Esports" 1}}
1 Like

Ah… Simple as that “lowering whole content first” .
Thanks :blush::+1:

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