Different behavior locally vs on netlify

It’s a file path separator issue. Had to change from

{{ $thisSection := replace .File.Dir "\\" "" }}

to

{{ $thisSection := replace (replace .File.Dir "\\" "") "/" "" }}

I guess replaceRE would work too.

1 Like