feat: description and custom title in help

This commit is contained in:
Matthieu Bessat 2021-10-03 10:41:40 +02:00
parent 86c2321fab
commit 2b64fe576f

View file

@ -13,7 +13,11 @@ function generateHelp($selectedModule) {
} }
$helpConfig = require($additionalHelpPath); $helpConfig = require($additionalHelpPath);
echo "<h1>Help for module \"$selectedModule\"</h1>"; $moduleTitle = $helpConfig['title'] ?? $selectedModule;
echo "<h1>Help for module \"$moduleTitle\"</h1>";
if (isset($helpConfig['description'])) {
echo "<h3>" . $helpConfig['description'] . "</h3>";
}
echo " <ul>"; echo " <ul>";
foreach ($helpConfig['actions'] as $action) { foreach ($helpConfig['actions'] as $action) {
?> ?>