@antora/site-mapper
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -46,5 +46,6 @@ 'use strict' | ||
function mapSite (playbook, pages) { | ||
if (!pages.length) return [] | ||
let siteUrl = playbook.site.url | ||
if (!siteUrl || siteUrl.charAt() === '/') return [] | ||
if (!(siteUrl && pages.length)) return [] | ||
const robots = playbook.site.robots | ||
if (siteUrl.charAt() === '/') return robots ? [createRobotsExclusionFile(robots)] : [] | ||
if (siteUrl.charAt(siteUrl.length - 1) === '/') siteUrl = siteUrl.substr(0, siteUrl.length - 1) | ||
@@ -63,3 +64,2 @@ const lastmodISO = new Date().toISOString() | ||
}, new Map()) | ||
sitemaps = Array.from(sitemaps.keys()) | ||
@@ -78,3 +78,2 @@ .sort((a, b) => a.localeCompare(b)) | ||
}) | ||
let sitemapIndex | ||
@@ -91,5 +90,3 @@ if (sitemaps.length > 1) { | ||
sitemapIndex.pub = { url: '/' + basename } | ||
const robots = playbook.site.robots | ||
if (robots) sitemaps.push(createRobotsExclusionFile(robots)) | ||
return sitemaps | ||
return robots ? sitemaps.concat(createRobotsExclusionFile(robots)) : sitemaps | ||
} | ||
@@ -96,0 +93,0 @@ |
{ | ||
"name": "@antora/site-mapper", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Generates sitemap files that list all publishable pages in an Antora documentation pipeline.", | ||
@@ -19,3 +19,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/content-classifier": "2.3.0", | ||
"@antora/content-classifier": "2.3.1", | ||
"vinyl": "~2.2" | ||
@@ -40,3 +40,3 @@ }, | ||
], | ||
"gitHead": "a268deae12211eb89f82ce5cc7d809b97baeb2a2" | ||
"gitHead": "b5c90bd55ba16fc6b293ea76d40452212c6e2a37" | ||
} |
24527
152
+ Added@antora/asciidoc-loader@2.3.1(transitive)
+ Added@antora/content-classifier@2.3.1(transitive)
- Removed@antora/asciidoc-loader@2.3.0(transitive)
- Removed@antora/content-classifier@2.3.0(transitive)