@antora/content-classifier
Advanced tools
Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5
@@ -22,4 +22,2 @@ 'use strict' | ||
function classifyContent (playbook, aggregate) { | ||
let siteUrl = playbook.site.url | ||
if (siteUrl && siteUrl.charAt(siteUrl.length - 1) === '/') siteUrl = siteUrl.substr(0, siteUrl.length - 1) | ||
return aggregate.reduce((catalog, { name: component, version, title, start_page: startPage, nav, files }) => { | ||
@@ -33,3 +31,3 @@ files.forEach((file) => { | ||
if (family !== 'navigation') file.out = resolveOut(file.src, playbook.urls.htmlExtensionStyle) | ||
file.pub = resolvePub(file.src, file.out, playbook.urls.htmlExtensionStyle, siteUrl) | ||
file.pub = resolvePub(file.src, file.out, playbook.urls.htmlExtensionStyle) | ||
} | ||
@@ -152,3 +150,3 @@ | ||
function resolvePub (src, out, htmlExtensionStyle, siteUrl) { | ||
function resolvePub (src, out, htmlExtensionStyle) { | ||
const pub = {} | ||
@@ -181,3 +179,2 @@ const family = src.family | ||
pub.url = url | ||
if (siteUrl) pub.absoluteUrl = siteUrl + url | ||
@@ -184,0 +181,0 @@ if (out) { |
{ | ||
"name": "@antora/content-classifier", | ||
"version": "1.0.0-alpha.4", | ||
"version": "1.0.0-alpha.5", | ||
"description": "Organizes aggregated content into a virtual file catalog for use in an Antora documentation pipeline.", | ||
@@ -5,0 +5,0 @@ "license": "MPL-2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12633
293