HUGO
News Docs Themes Community GitHub

continue

Used with the range statement, stops the innermost iteration and continues to the next iteration.

Syntax

continue

This template code:

{{ $s := slice "foo" "bar" "baz" }}
{{ range $s }}
  {{ if eq . "bar" }}
    {{ continue }}
  {{ end }}
  <p>{{ . }}</p>
{{ end }}

Is rendered to:

<p>foo</p>
<p>baz</p>

See Go’s text/template documentation for more information.