code: func (c *templateContext) collectConfig(n *parse.PipeNode) {
  	if c.typ != templateShortcode {
  		return
  	}
  	if c.configChecked {
  		return
  	}
  	c.configChecked = true
  
  	if len(n.Decl) != 1 || len(n.Cmds) != 1 {
  		// This cannot be a config declaration
  		return
  	}
  
  	v := n.Decl[0]
  
  	if len(v.Ident) == 0 || v.Ident[0] != "$_hugo_config" {
  		return
  	}
  
  	cmd := n.Cmds[0]
  
  	if len(cmd.Args) == 0 {
  		return
  	}
  
  	if s, ok := cmd.Args[0].(*parse.StringNode); ok {
  		errMsg := "failed to decode $_hugo_config in template"
  		m, err := cast.ToStringMapE(s.Text)
  		if err != nil {
  			c.err = errors.Wrap(err, errMsg)
  			return
  		}
  		if err := mapstructure.WeakDecode(m, &c.Info.Config); err != nil {
  			c.err = errors.Wrap(err, errMsg)
  		}
  	}
  
  }
docs: // collectConfig collects and parses any leading template config variable declaration.
  // This will be the first PipeNode in the template, and will be a variable declaration
  // on the form:
  //    {{ $_hugo_config:= `{ "version": 1 }` }}