# `mix brix.gen.section`
[🔗](https://github.com/LoamStudios/brix/blob/main/lib/mix/tasks/brix.gen.section.ex#L1)

Adds a section to a Brix page version.

    mix brix.gen.section SLUG TEMPLATE [--content-dir PATH] [--version VER]
                                       [--position NN] [--parent SECTION]
                                       [--field FIELD]

## Examples

    mix brix.gen.section home hero
    mix brix.gen.section home cta --position 10
    mix brix.gen.section home testimonial_card --parent 05-reviews-section

## Nested children

Use `--parent` to create a child section inside a parent's `.children/` directory.
The `--field` flag specifies which children field (defaults to `"children"`).
The child template is validated against the parent's `of:` constraint.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
