setName('display') ->setDescription('Display a list the available shortcodes that are registered'); } /** * @return int|null|void */ protected function serve() { $io = new SymfonyStyle($this->input, $this->output); $this->initializePlugins(); $this->initializeThemes(); $shortcodes = Grav::instance()['shortcode']; $io->title('Available Shortcodes'); $io->section('Regular Handlers:'); foreach ($shortcodes->getHandlers()->getNames() as $name) { $io->writeln($name); } $io->section('Raw Handlers:'); foreach ($shortcodes->getRawHandlers()->getNames() as $name) { $io->writeln($name); } $io->newLine(); } }