Antora 3.0.0

Issue gh-10962
This commit is contained in:
Rob Winch
2022-03-11 12:50:06 -06:00
parent ac9c29b2a0
commit 9967078059
4 changed files with 48 additions and 12 deletions

View File

@@ -0,0 +1,35 @@
// https://gitlab.com/antora/antora/-/issues/132#note_712132072
'use strict'
module.exports.register = function({ config }) {
this.on('contentAggregated', ({ contentAggregate }) => {
contentAggregate.forEach(aggregate => {
if (aggregate.name === "" && aggregate.displayVersion === 5.6) {
aggregate.name = "ROOT";
aggregate.version = "5.6.0-RC1"
aggregate.startPage = "ROOT:index.adoc"
aggregate.displayVersion = `${aggregate.version}`
delete aggregate.prerelease
}
if (aggregate.version === "5.6.1" &&
aggregate.prerelease == "-SNAPSHOT") {
aggregate.version = "5.6.1"
aggregate.displayVersion = `${aggregate.version}`
delete aggregate.prerelease
}
})
})
}
function out(args) {
console.log(JSON.stringify(args, no_data, 2));
}
function no_data(key, value) {
if (key == "data" || key == "files") {
return value ? "__data__" : value;
}
return value;
}