aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--lib/MGA/Advisories.pm2
2 files changed, 3 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 8a16eb6..74404ba 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Version X
- template: change default CVE year to 2024
- use https: links where possible
- add 'showjson' command to output an advisory in OSV JSON format
+- have 'mksite' write JSON output files as well
Version 0.27
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index c8514fa..8ce3581 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -620,6 +620,7 @@ sub output_pages {
ENCODING => 'utf8',
INCLUDE_PATH => $config->{tmpl_dir},
OUTPUT_PATH => $config->{out_dir},
+ EVAL_PERL => 1,
);
foreach my $adv (keys %{$advdb->{advisories}}) {
my $vars = {
@@ -630,6 +631,7 @@ sub output_pages {
tools => \%tools,
};
process_template($template, 'advisory', $vars, $basename{ID}->($adv));
+ process_template($template, 'advisory', $vars, $basename{ID}->($adv), 'json');
}
foreach my $by (['rel', 'by_rel'], ['CVE', 'by_cve'], ['src', 'by_src']) {
foreach my $r (keys %{$advdb->{$by->[1]}}) {