Skip to content

Commit

Permalink
default to sitemap_version before latest
Browse files Browse the repository at this point in the history
  • Loading branch information
recrwplay committed Dec 19, 2024
1 parent d85cceb commit 591070b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/antora/antora-modify-sitemaps/modify-sitemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports.register = function ({ config }) {
mapSite (playbook, pages) {
const mappablePages = pages.reduce((mappable, file) => {

const mappableVersion = data.components[file.src.component] ? data.components[file.src.component] : sitemapVersion || ''
const mappableVersion = sitemapVersion || data.components[file.src.component] || ''
const mappableFile = ( file.src.version == mappableVersion || ( !file.src.version && !mappableVersion ) )

if (mappableFile) {
Expand Down Expand Up @@ -127,7 +127,7 @@ module.exports.register = function ({ config }) {
// components without sitemaps
for (const component in excludeVersions) {
if (!Object.keys(mappableComponentVersions).includes(component)) {
const mappableVersion = data.components[component] ? data.components[component] : sitemapVersion
const mappableVersion = sitemapVersion || data.components[component]
logger.warn({ }, 'Could not create sitemap for \'%s\' version \'%s\'. Available versions are \'%s\'', component, mappableVersion, excludeVersions[component].join(', ') )
}
}
Expand Down

0 comments on commit 591070b

Please sign in to comment.