Skip to content

Commit bc071c7

Browse files
committed
remove homepage-specific version, no longer needed
1 parent 2af510b commit bc071c7

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

lib/path-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function getVersionStringFromPath (href) {
3636

3737
// Return immediately if this is a link to the homepage
3838
if (href === '/') {
39-
return 'homepage'
39+
return nonEnterpriseDefaultVersion
4040
}
4141

4242
// Get the first segment

lib/permalink.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const assert = require('assert')
22
const path = require('path')
33
const patterns = require('./patterns')
44
const allVersions = require('./all-versions')
5-
const nonEnterpriseDefaultVersion = require('./non-enterprise-default-version')
65
const removeFPTFromPath = require('./remove-fpt-from-path')
76

87
class Permalink {
@@ -27,24 +26,10 @@ class Permalink {
2726
assert(languageCode, 'languageCode is required')
2827

2928
const permalinks = applicableVersions
30-
// skip the Dotcom homepage here because a special homepage permalink is added below
31-
.filter(pageVersion => !(pageVersion === nonEnterpriseDefaultVersion && relativePath === 'index.md'))
3229
.map(pageVersion => {
3330
return new Permalink(languageCode, pageVersion, relativePath, title)
3431
})
3532

36-
// special permalink for homepage
37-
if (relativePath === 'index.md') {
38-
const homepagePermalink = {
39-
...permalinks[0],
40-
href: '/' + languageCode,
41-
pageVersion: 'homepage',
42-
pageVersionTitle: permalinks[0].title,
43-
homepage: true
44-
}
45-
permalinks.push(homepagePermalink)
46-
}
47-
4833
return permalinks
4934
}
5035

0 commit comments

Comments
 (0)