diff --git a/scripts/website/expand_templates/linters.go b/scripts/website/expand_templates/linters.go index 4e4c28c0505b..87a386e4ace0 100644 --- a/scripts/website/expand_templates/linters.go +++ b/scripts/website/expand_templates/linters.go @@ -254,7 +254,7 @@ func (e *ExampleSnippetsExtractor) extractExampleSnippets(example []byte) (*Sett for j, node := range root.Content { switch node.Value { - case "run", "output", keyLinters, keyFormatters, "issues", "severity": + case "run", "output", keyLinters, keyFormatters, "issues", "severity", "version": default: continue } @@ -280,6 +280,11 @@ func (e *ExampleSnippetsExtractor) extractExampleSnippets(example []byte) (*Sett }, } + if node.Value == "version" { + node.HeadComment = `See the dedicated "version" documentation section.` + newNode = nextNode + } + globalNode.Content = append(globalNode.Content, node, newNode) if node.Value == keyLinters || node.Value == keyFormatters {