@antora/content-classifier 3.0.0-beta.3 → 3.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/content-catalog.js +9 -3
- package/package.json +4 -3
package/lib/content-catalog.js
CHANGED
|
@@ -268,8 +268,12 @@ class ContentCatalog {
|
|
|
268
268
|
(startPageSrc = startPage.src).component === name &&
|
|
269
269
|
startPageSrc.version === version
|
|
270
270
|
) {
|
|
271
|
-
if (
|
|
272
|
-
|
|
271
|
+
if (!this.getById(indexPageId)) {
|
|
272
|
+
const indexAliasId = Object.assign({}, ROOT_INDEX_ALIAS_ID, { component: name, version })
|
|
273
|
+
const indexAlias = this.getById(indexAliasId)
|
|
274
|
+
indexAlias
|
|
275
|
+
? indexAlias.synthetic && Object.assign(indexAlias, { rel: startPage })
|
|
276
|
+
: this.addFile({ src: indexAliasId, rel: startPage, synthetic: true })
|
|
273
277
|
}
|
|
274
278
|
} else {
|
|
275
279
|
// TODO pass componentVersion as logObject
|
|
@@ -312,7 +316,9 @@ class ContentCatalog {
|
|
|
312
316
|
if (!startPageSpec) return
|
|
313
317
|
const rel = this.resolvePage(startPageSpec)
|
|
314
318
|
if (rel) {
|
|
315
|
-
if (
|
|
319
|
+
if (this.getById(ROOT_INDEX_PAGE_ID)) return
|
|
320
|
+
const indexAlias = this.getById(ROOT_INDEX_ALIAS_ID)
|
|
321
|
+
if (indexAlias) return indexAlias.synthetic ? Object.assign(indexAlias, { rel }) : undefined
|
|
316
322
|
return this.addFile({ src: Object.assign({}, ROOT_INDEX_ALIAS_ID), rel, synthetic: true })
|
|
317
323
|
} else if (rel === false) {
|
|
318
324
|
logger.warn('Start page specified for site has invalid syntax: %s', startPageSpec)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/content-classifier",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.4",
|
|
4
4
|
"description": "Organizes aggregated content into a virtual file catalog for use in an Antora documentation pipeline.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "OpenDevise Inc. (https://opendevise.com)",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"main": "lib/index.js",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@antora/logger": "3.0.0-beta.
|
|
19
|
+
"@antora/logger": "3.0.0-beta.4",
|
|
20
20
|
"mime-types": "~2.1",
|
|
21
21
|
"vinyl": "~2.2"
|
|
22
22
|
},
|
|
@@ -34,5 +34,6 @@
|
|
|
34
34
|
"static site",
|
|
35
35
|
"web publishing"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "8a142499e9f1a9e0631777796e06dd6c010d3a90",
|
|
38
|
+
"readmeFilename": "README.md"
|
|
38
39
|
}
|