# `mix site_maps.generate`
[🔗](https://github.com/marcosgz/site_maps_ex/blob/v0.1.0/lib/mix/tasks/site_maps.generate.ex#L1)

Generates the sitemaps of a module that uses `SiteMaps`.

    $ mix site_maps.generate MyApp.Sitemaps
    $ mix site_maps.generate MyApp.Sitemaps posts,news --context site=acme --arg year=2026 --arg month=3

The optional second argument is a comma-separated list of processes to run. Without it every
process runs with its default arguments.

## Options

  * `--context key=value` - context entry, repeatable. When the module implements
    `c:SiteMaps.load_context/1` it receives the string-keyed map; otherwise the callbacks get a map
    with atom keys and string values.
  * `--arg key=value` - process argument, repeatable, given to each listed process that declares it
    and cast to the declared argument type. An argument no listed process declares is an error.
  * `--max-concurrency N` - number of processes run in parallel
  * `--prune` - delete files of the regenerated processes that are no longer listed
  * `--quiet` - do not log progress

# `parse_args`

```elixir
@spec parse_args([String.t()]) :: {module(), keyword()}
```

Parses the command line into the module and the `SiteMaps.generate/2` options. The context is
kept as a string-keyed map and the `:quiet` flag is included.

---

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