@antora/redirect-producer
Advanced tools
Comparing version 3.1.1 to 3.2.0-alpha.1
@@ -37,4 +37,3 @@ 'use strict' | ||
if (!aliases.length) return [] | ||
let siteUrl = playbook.site.url | ||
if (siteUrl) siteUrl = stripTrailingSlash(siteUrl, '') | ||
const siteUrl = playbook.site.url | ||
const directoryRedirects = (playbook.urls.htmlExtensionStyle || 'default') !== 'default' | ||
@@ -167,4 +166,4 @@ switch (playbook.urls.redirectFacility) { | ||
function stripTrailingSlash (str, root = '/') { | ||
if (str === '/') return root | ||
function stripTrailingSlash (str) { | ||
if (str === '/') return str | ||
const lastIdx = str.length - 1 | ||
@@ -171,0 +170,0 @@ return str.charAt(lastIdx) === '/' ? str.substr(0, lastIdx) : str |
{ | ||
"name": "@antora/redirect-producer", | ||
"version": "3.1.1", | ||
"version": "3.2.0-alpha.1", | ||
"description": "Produces redirects (HTTP redirections) for pages in an Antora site.", | ||
@@ -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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
10090
169
1