function

Slug

Slug defines a required, unique, indexed text field whose value is generated from sourcePath until an author supplies a manual value. The source may be a direct string field or a string field beneath non-repeated groups.

Arguments

ArgumentTypeDescription
namestringThe name value.
sourcePathstringThe sourcePath value.

Returns

The declared result.

TextField

Full signature

func Slug( name, sourcePath string, ) TextField

Source field/slug.go:11

Related types

  • TextField

    TextField configures a Text, Code, or Textarea string field.

Related guides