mirror of
https://github.com/getgrav/grav.git
synced 2026-07-01 03:27:24 +02:00
Additional slug fixes with GPM (#44). Increased spaces in GPM CLI
This commit is contained in:
@@ -10,6 +10,7 @@ abstract class AbstractPackageCollection extends BaseCollection {
|
||||
public function __construct($items)
|
||||
{
|
||||
foreach ($items as $name => $data) {
|
||||
$data->set('slug', $name);
|
||||
$this->items[$name] = new Package($data, $this->type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class Package extends BasePackage
|
||||
$this->settings = $package->toArray();
|
||||
|
||||
$html_description = \Parsedown::instance()->line($this->description);
|
||||
$this->data->set('slug', strtolower($this->name));
|
||||
$this->data->set('slug', $package->slug);
|
||||
$this->data->set('description_html', $html_description);
|
||||
$this->data->set('description_plain', strip_tags($html_description));
|
||||
$this->data->set('symlink', is_link(USER_DIR . $package_type . DS . $this->name));
|
||||
|
||||
@@ -67,9 +67,9 @@ class IndexCommand extends Command
|
||||
// index
|
||||
str_pad($index++ + 1, 2, '0', STR_PAD_LEFT) . ". " .
|
||||
// package name
|
||||
"<cyan>" . str_pad($package->name, 15) . "</cyan> " .
|
||||
"<cyan>" . str_pad($package->name, 20) . "</cyan> " .
|
||||
// slug
|
||||
"[" . str_pad($slug, 15, ' ', STR_PAD_BOTH) . "] " .
|
||||
"[" . str_pad($slug, 20, ' ', STR_PAD_BOTH) . "] " .
|
||||
// version details
|
||||
$this->versionDetails($package)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user