Meridian handbook
ReferenceCLI

new

engine-dmo new: Scaffold a type, a template, a component or a block. Every subcommand, argument and flag.

Scaffold a type, a template, a component or a block.

Every new command loads the whole configuration, so DATABASE_URL and every other variable without a default must be set, even though none connects to the database; a placeholder will do (see Commands and the environment).

CommandWhat it does
engine-dmo new blockA block template, and the schema stub that declares the block
engine-dmo new componentA component: its contract, markup and co-located CSS
engine-dmo new templateA template: a starter for a type, or a site’s copy of the shared one with --from-shared
engine-dmo new typeA schema file for a custom type, and its template

engine-dmo new block

A block template, and the schema stub that declares the block.

engine-dmo new block <key> [flags]
ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--fieldstringthe blocks field that declares it
--typestringthe type whose blocks field declares the block

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo new component

A component: its contract, markup and co-located CSS.

engine-dmo new component <name>
ArgumentRequiredRepeatable
nameyesno

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo new template

A template: a starter for a type, or a site’s copy of the shared one with --from-shared.

engine-dmo new template <name> [flags]
ArgumentRequiredRepeatable
nameyesno
FlagTypeDefaultMeaning
--from-sharedboolcopy the template the site resolves today into its own root, recording where it came from so engine-dmo check reports when the original changes

--json prints the text output in the JSON envelope. Runs in a project.

new template <type>/entry.html writes a starter that prints the type’s fields. new template <type>/index.html writes only an empty body block naming the file, with no heading and no list: write the page’s h1, the list and its pager before you render it, or the accessibility checks fail on it. Context shows what an index page has to work with.

engine-dmo new type

A schema file for a custom type, and its template.

engine-dmo new type <key>
ArgumentRequiredRepeatable
keyyesno

--json prints the text output in the JSON envelope. Runs in a project.