| @@ 24-39 (lines=16) @@ | ||
| 21 | /** |
|
| 22 | * {@inheritdoc} |
|
| 23 | */ |
|
| 24 | protected function configure() |
|
| 25 | { |
|
| 26 | $this |
|
| 27 | ->setName('build') |
|
| 28 | ->setDescription('Build the website') |
|
| 29 | ->setDefinition( |
|
| 30 | new InputDefinition([ |
|
| 31 | new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), |
|
| 32 | new InputOption('drafts', 'd', InputOption::VALUE_NONE, 'Include drafts'), |
|
| 33 | new InputOption('dry-run', null, InputOption::VALUE_NONE, 'Build without saving'), |
|
| 34 | new InputOption('baseurl', null, InputOption::VALUE_REQUIRED, 'Set the base URL'), |
|
| 35 | new InputOption('destination', null, InputOption::VALUE_REQUIRED, 'Set the output directory'), |
|
| 36 | ]) |
|
| 37 | ) |
|
| 38 | ->setHelp('Build the website in the output directory.'); |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * {@inheritdoc} |
|
| @@ 33-48 (lines=16) @@ | ||
| 30 | /** |
|
| 31 | * {@inheritdoc} |
|
| 32 | */ |
|
| 33 | protected function configure() |
|
| 34 | { |
|
| 35 | $this |
|
| 36 | ->setName('serve') |
|
| 37 | ->setDescription('Start the built-in server') |
|
| 38 | ->setDefinition( |
|
| 39 | new InputDefinition([ |
|
| 40 | new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), |
|
| 41 | new InputOption('drafts', 'd', InputOption::VALUE_NONE, 'Include drafts'), |
|
| 42 | new InputOption('open', 'o', InputOption::VALUE_NONE, 'Open browser automatically'), |
|
| 43 | new InputOption('host', null, InputOption::VALUE_OPTIONAL, 'Server host'), |
|
| 44 | new InputOption('port', null, InputOption::VALUE_OPTIONAL, 'Server port'), |
|
| 45 | ]) |
|
| 46 | ) |
|
| 47 | ->setHelp('Start the live-reloading-built-in web server.'); |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * {@inheritdoc} |
|
| @@ 27-42 (lines=16) @@ | ||
| 24 | /** |
|
| 25 | * {@inheritdoc} |
|
| 26 | */ |
|
| 27 | protected function configure() |
|
| 28 | { |
|
| 29 | $this |
|
| 30 | ->setName('new:page') |
|
| 31 | ->setDescription('Create a new page') |
|
| 32 | ->setDefinition( |
|
| 33 | new InputDefinition([ |
|
| 34 | new InputArgument('name', InputArgument::REQUIRED, 'New page name'), |
|
| 35 | new InputArgument('path', InputArgument::OPTIONAL, 'Use the given path as working directory'), |
|
| 36 | new InputOption('force', 'f', InputOption::VALUE_NONE, 'Override the file if already exist'), |
|
| 37 | new InputOption('open', 'o', InputOption::VALUE_NONE, 'Open editor automatically'), |
|
| 38 | new InputOption('prefix', 'p', InputOption::VALUE_NONE, 'Add date (`YYYY-MM-DD`) as a prefix'), |
|
| 39 | ]) |
|
| 40 | ) |
|
| 41 | ->setHelp('Create a new page file (with a default title and the current date).'); |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * {@inheritdoc} |
|