Added YAML Linter reports section

This commit is contained in:
Andy Miller
2019-04-20 17:43:26 -06:00
parent 9ae5502925
commit a8fd054936
5 changed files with 38 additions and 21 deletions

View File

@@ -9,6 +9,7 @@ use Grav\Common\GPM\GPM;
use Grav\Common\GPM\Licenses;
use Grav\Common\GPM\Response;
use Grav\Common\Grav;
use Grav\Common\Helpers\YamlLinter;
use Grav\Common\Language\LanguageCodes;
use Grav\Common\Page\Collection;
use Grav\Common\Page\Interfaces\PageInterface;
@@ -1671,6 +1672,14 @@ class Admin
'result' => $result,
]);
// Linting Issues
$result = YamlLinter::lint();
$reports['Yaml Linter'] = $this->grav['twig']->processTemplate('reports/yamllinter.html.twig', [
'result' => $result,
]);
// Fire new event to allow plugins to manipulate page frontmatter
$this->grav->fireEvent('onAdminGenerateReports', new Event(['reports' => $reports]));