@antora/content-classifier 3.0.0-beta.5 → 3.0.0-rc.3
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
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'
|
|
@@ -156,11 +156,7 @@ function resolveAsciiDocConfig (siteAsciiDocConfig, { asciidoc }) {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
function calculateRootPath (depth) {
|
|
159
|
-
return depth
|
|
160
|
-
? Array(depth)
|
|
161
|
-
.fill('..')
|
|
162
|
-
.join('/')
|
|
163
|
-
: '.'
|
|
159
|
+
return depth ? Array(depth).fill('..').join('/') : '.'
|
|
164
160
|
}
|
|
165
161
|
|
|
166
162
|
module.exports = classifyContent
|
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
|
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.3",
|
|
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.3",
|
|
20
23
|
"mime-types": "~2.1",
|
|
21
24
|
"vinyl": "~2.2"
|
|
22
25
|
},
|
|
@@ -34,5 +37,5 @@
|
|
|
34
37
|
"static site",
|
|
35
38
|
"web publishing"
|
|
36
39
|
],
|
|
37
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "f3b3cbb4a08640bbcf55e685929409e20b186634"
|
|
38
41
|
}
|