1
0
mirror of synced 2025-12-20 18:36:31 -05:00

remove helper from this branch (to be re-added in child branch for easier reviewing)

This commit is contained in:
Sarah Schneider
2021-01-14 12:07:49 -05:00
parent 79a7a7972f
commit b6032f285c
8 changed files with 9 additions and 30 deletions

View File

@@ -3,7 +3,6 @@ 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) {
@@ -14,7 +13,8 @@ class Permalink {
const permalinkSuffix = this.constructor.relativePathToSuffix(relativePath)
this.href = removeFPTFromPath(path.join('/', languageCode, pageVersion, permalinkSuffix))
this.href = path.join('/', languageCode, pageVersion, permalinkSuffix)
.replace(patterns.trailingSlash, '$1')
this.pageVersionTitle = allVersions[pageVersion].versionTitle
@@ -49,7 +49,6 @@ class Permalink {
return '/' + relativePath
.replace('index.md', '')
.replace('.md', '')
.replace(patterns.trailingSlash, '$1')
}
}