@antora/content-classifier 3.0.0-beta.4 → 3.0.0-rc.2
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/classify-content.js +2 -2
- package/lib/content-catalog.js +6 -12
- package/package.json +6 -4
package/lib/classify-content.js
CHANGED
|
@@ -64,10 +64,10 @@ function allocateSrc (file, component, version, nav) {
|
|
|
64
64
|
let familyFolder = pathSegments[2]
|
|
65
65
|
switch (familyFolder) {
|
|
66
66
|
case 'pages':
|
|
67
|
-
//
|
|
67
|
+
// pages/_partials location for partials is @deprecated; special designation scheduled to be removed in Antora 4
|
|
68
68
|
if (pathSegments[3] === '_partials') {
|
|
69
69
|
file.src.family = 'partial'
|
|
70
|
-
// relative to modules/<module>/pages/_partials
|
|
70
|
+
// relative to modules/<module>/pages/_partials
|
|
71
71
|
file.src.relative = pathSegments.slice(4).join('/')
|
|
72
72
|
} else if (extname === '.adoc') {
|
|
73
73
|
file.src.family = 'page'
|
package/lib/content-catalog.js
CHANGED
|
@@ -322,7 +322,7 @@ class ContentCatalog {
|
|
|
322
322
|
return this.addFile({ src: Object.assign({}, ROOT_INDEX_ALIAS_ID), rel, synthetic: true })
|
|
323
323
|
} else if (rel === false) {
|
|
324
324
|
logger.warn('Start page specified for site has invalid syntax: %s', startPageSpec)
|
|
325
|
-
} else if (
|
|
325
|
+
} else if (startPageSpec.lastIndexOf(':') > startPageSpec.indexOf(':')) {
|
|
326
326
|
logger.warn('Start page specified for site not found: %s', startPageSpec)
|
|
327
327
|
} else {
|
|
328
328
|
logger.warn('Missing component name in start page for site: %s', startPageSpec)
|
|
@@ -331,7 +331,7 @@ class ContentCatalog {
|
|
|
331
331
|
|
|
332
332
|
// QUESTION should this be addPageAlias?
|
|
333
333
|
registerPageAlias (spec, target) {
|
|
334
|
-
// .adoc file extension
|
|
334
|
+
// adding .adoc file extension to page alias if missing is @deprecated; scheduled to be removed in Antora 4
|
|
335
335
|
const inferredSpec = spec.endsWith('.adoc') ? undefined : spec + '.adoc'
|
|
336
336
|
const src = parseResourceId(inferredSpec || spec, target.src, 'page', ['page'])
|
|
337
337
|
// QUESTION should we throw an error if alias is invalid?
|
|
@@ -525,9 +525,9 @@ function computePub (src, out, family, version, htmlUrlExtensionStyle) {
|
|
|
525
525
|
}
|
|
526
526
|
|
|
527
527
|
function computeVersionSegment (name, version, mode) {
|
|
528
|
+
// special designation for master verson is @deprecated; special designation scheduled to be removed in Antora 4
|
|
528
529
|
if (mode === 'original') return !version || version === 'master' ? '' : version
|
|
529
530
|
const strategy = this.latestVersionUrlSegmentStrategy
|
|
530
|
-
// NOTE: special exception; revisit in Antora 3
|
|
531
531
|
if (!version || version === 'master') {
|
|
532
532
|
if (mode !== 'alias') return ''
|
|
533
533
|
if (strategy === 'redirect:to') return
|
|
@@ -571,15 +571,9 @@ function createSymbolicVersionAlias (component, version, symbolicVersionSegment,
|
|
|
571
571
|
family
|
|
572
572
|
),
|
|
573
573
|
}
|
|
574
|
-
|
|
575
|
-
originalVersionAlias
|
|
576
|
-
|
|
577
|
-
return originalVersionAlias
|
|
578
|
-
} else {
|
|
579
|
-
symbolicVersionAlias.out = undefined
|
|
580
|
-
symbolicVersionAlias.rel = originalVersionAlias
|
|
581
|
-
return symbolicVersionAlias
|
|
582
|
-
}
|
|
574
|
+
return strategy === 'redirect:to'
|
|
575
|
+
? Object.assign(originalVersionAlias, { out: undefined, rel: symbolicVersionAlias })
|
|
576
|
+
: Object.assign(symbolicVersionAlias, { out: undefined, rel: originalVersionAlias })
|
|
583
577
|
}
|
|
584
578
|
|
|
585
579
|
function getFileLocation ({ path: path_, src: { abspath, origin } }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/content-classifier",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-rc.2",
|
|
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)",
|
|
@@ -15,8 +15,11 @@
|
|
|
15
15
|
"url": "https://gitlab.com/antora/antora/issues"
|
|
16
16
|
},
|
|
17
17
|
"main": "lib/index.js",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "_mocha"
|
|
20
|
+
},
|
|
18
21
|
"dependencies": {
|
|
19
|
-
"@antora/logger": "3.0.0-
|
|
22
|
+
"@antora/logger": "3.0.0-rc.2",
|
|
20
23
|
"mime-types": "~2.1",
|
|
21
24
|
"vinyl": "~2.2"
|
|
22
25
|
},
|
|
@@ -34,6 +37,5 @@
|
|
|
34
37
|
"static site",
|
|
35
38
|
"web publishing"
|
|
36
39
|
],
|
|
37
|
-
"gitHead": "
|
|
38
|
-
"readmeFilename": "README.md"
|
|
40
|
+
"gitHead": "b64861391b7e55ea31fcecce4490b9cc02fec1c7"
|
|
39
41
|
}
|