When I do this, I am unable to access global variables such as $.Site.(something). I also tried passing a new variable, "root" \$ but it fails. Please help me with this.
Had to place a \ beside $ because this site won’t render $ alone.
In the meantime, I’ve also got stuck in another problem.
I can’t access .IsHome in the partial using .context.IsHome. Hugo print the following in the console: parse failed: template: partials/nav.html:5: function "context" not defined
{{ if not .context.IsHome }}
<div class="item">
<a href="/">
<i class="inverted big link home icon" title="{{ i18n `home` }}"></i>
</a>
</div>
{{ end }}
But somehow, it still fails, giving the above stated message while building.
This is the exact message:
executing "partials/nav.html" at <.context.IsHome>: can't evaluate field context in type *hugolib.PageOutput