content-type
Add a document type to a content collection library
When to use it
Add a document type to a content collection library. Use this when you want to add the corresponding files or task to your workspace.
Usage
npm exec -- nx generate @megamono/plugin:content-type --collection="<collection>" --name="<name>" --dry-runReplace angle-bracket placeholders with reviewed values. Nx's --dry-run previews generator writes; remove it only after reviewing the plan. Examples use npm; use your workspace's package manager if it differs.
Options
Use these options with @megamono/plugin:content-type. Nx uses the camelCase names shown here; the CLI reference describes command-line aliases. Some options are required only for particular choices.
| Option | Required | Type | Default | Description |
|---|---|---|---|---|
collection | Yes | string | — | Which content collection should receive the type? |
name | Yes | string | — | What should the document type be called? |
Next steps
Review changed files and run the affected project's checks. For options that accept structured values, run the generator's --help or consult the schema in the installed package.