Skip to content

Using cyclic refs in <script> kills hugo #1123

Closed
@rauhs

Description

For instance using {{.Site.Sections}} in a <script> will kill hugo with a stackoverflow. Presumably, golang wants to convert the variable to JSON due to the context and this fails.

What is the best way to pass down Hugo variables to javascript?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions