Skip to main content

The page command

Sets up a page component and locale data files in a corgi project. Must be executed from the root of the project directory.

Basic usage

npx @wethegit/corgi@latest page

Arguments

ArgumentsDescription
name(s)A space-separated list of page component names. If you do not pass any name arguments, you will be prompted to enter a page component name.

Examples

npx @wethegit/corgi@latest page About
npx @wethegit/corgi@latest page About Work Contact
Subdirectories

You can create nested pages using the CLI as well. For example, this is a valid command:

npx @wethegit/corgi@latest page Work/CaseStudies

Options

FlagShort flagDefault valueDescription
--locales-lenOptional. A space-separated list of locale slugs.
--help-hDisplays a list of arguments and options.

Examples

npx @wethegit/corgi@latest page About --locales en es fr pt

All together now…

npx @wethegit/corgi@latest page About Work Contact Blog --locales en-us es-mx fr-ca

This will scaffold out all the necessary locale YAML files and page components for four different pages, with three locales each. Huzzah!