add remove-fpt helper function
This commit is contained in:
@@ -3,6 +3,7 @@ const path = require('path')
|
||||
const patterns = require('./patterns')
|
||||
const getApplicableVersions = require('./get-applicable-versions')
|
||||
const allVersions = require('./all-versions')
|
||||
const removeFPTFromPath = require('./remove-fpt-from-path')
|
||||
|
||||
class Permalink {
|
||||
constructor (languageCode, pageVersion, relativePath, title) {
|
||||
@@ -13,7 +14,7 @@ class Permalink {
|
||||
|
||||
const permalinkSuffix = this.constructor.relativePathToSuffix(relativePath)
|
||||
|
||||
this.href = path.join('/', languageCode, pageVersion, permalinkSuffix)
|
||||
this.href = removeFPTFromPath(path.join('/', languageCode, pageVersion, permalinkSuffix))
|
||||
.replace(patterns.trailingSlash, '$1')
|
||||
|
||||
this.pageVersionTitle = allVersions[pageVersion].versionTitle
|
||||
|
||||
Reference in New Issue
Block a user