Skip to content

Commit

Permalink
Fix docs page title
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Jan 17, 2022
1 parent e51895f commit 1e71eae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Commands/core/MkCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function docs(): void
$all = $application->all();
$namespaced = ListCommands::categorize($all);
[$nav_commands, $pages_commands] = $this->writeContentFilesAndAddToNav($namespaced, $destination, $dir_root, $destination_path);
$this->writeAllMd($pages_commands, $destination_path);
$this->writeAllMd($pages_commands, $destination_path, 'All commands');

$destination = 'generators';
$destination_path = Path::join($dir_root, 'docs', $destination);
Expand All @@ -57,7 +57,7 @@ public function docs(): void
$all = $this->createAnnotatedCommands($application_generate, Drush::getApplication());
$namespaced = ListCommands::categorize($all);
[$nav_generators, $pages_generators] = $this->writeContentFilesAndAddToNav($namespaced, $destination, $dir_root, $destination_path);
$this->writeAllMd($pages_generators, $destination_path);
$this->writeAllMd($pages_generators, $destination_path, 'All generators');

$this->writeYml($nav_commands, $nav_generators, $dir_root);
}
Expand Down Expand Up @@ -225,15 +225,15 @@ protected function writeYml(array $nav_commands, $nav_generators, string $dest):
file_put_contents(Path::join($dest, 'mkdocs.yml'), $yaml_nav);
}

protected function writeAllMd(array $pages_all, string $destination_path): void
protected function writeAllMd(array $pages_all, string $destination_path, string $title): void
{
unset($pages_all['all']);
foreach ($pages_all as $name => $page) {
$basename = basename($page);
$items[] = "* [$name]($basename)";
}
$preamble = <<<EOT
# All commands
# $title
!!! tip
Expand Down

0 comments on commit 1e71eae

Please sign in to comment.