Init
This commit is contained in:
commit
60ca58f5ba
80 changed files with 9458 additions and 0 deletions
29
lib/project-types/HexoProject.php
Normal file
29
lib/project-types/HexoProject.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/ProjectTypeBase.php';
|
||||
|
||||
class HexoProject extends ProjectTypeBase {
|
||||
public static function typeSlug(): string { return 'hexo'; }
|
||||
public static function typeName(): string { return 'Hexo'; }
|
||||
public static function typeIcon(): string { return 'bi-hexagon-fill'; }
|
||||
public static function description(): string { return 'Hexo static site generator'; }
|
||||
|
||||
public static function tabs(): array {
|
||||
return ['dashboard', 'analytics', 'posts', 'config', 'files',
|
||||
'run', 'themes', 'plugins', 'git',
|
||||
'notes', 'settings'];
|
||||
}
|
||||
|
||||
public static function commands(): array {
|
||||
return [
|
||||
['id' => 'generate', 'label' => 'Generate', 'cmd' => 'hexo generate'],
|
||||
['id' => 'clean', 'label' => 'Clean', 'cmd' => 'hexo clean'],
|
||||
['id' => 'deploy', 'label' => 'Deploy', 'cmd' => 'hexo deploy'],
|
||||
['id' => 'version', 'label' => 'Hexo version','cmd' => 'hexo version'],
|
||||
];
|
||||
}
|
||||
|
||||
public static function detectFromPath(string $path): bool {
|
||||
return file_exists($path . '/_config.yml')
|
||||
&& (is_dir($path . '/source') || is_dir($path . '/themes'));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue