Skip to content

Commit db9fccb

Browse files
Order_category_fix (#164)
1 parent 1962448 commit db9fccb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ const categoriesOrder = {
1717
authentication: 30,
1818
pipelines : 40,
1919
builds: 50,
20+
'operate on resources' : 60,
2021
contexts : 70 ,
2122
images : 80 ,
2223
triggers : 90,
2324
environments : 100 ,
2425
compositions : 110 ,
2526
'predefined pipelines': 120,
26-
27+
more : 130 ,
2728
};
2829

2930

@@ -226,8 +227,13 @@ const updateCategoryFileArray = async (nestedCategory,command, existingContent)
226227
const indexFile = path.resolve(baseDir, `./${(nestedCategory || 'undefined').toLowerCase()}/_index.md`);
227228
finalCategoryArr.indexPath = indexFile;
228229

229-
const headerString = `+++\ntitle = "${title}"\nweight = ${categoriesOrder[title.toLowerCase()] || 100}\n+++\n\n`;
230-
finalCategoryArr.header = headerString;
230+
if (!_.isEqual(title.toLowerCase(), 'more') && !_.isEqual(title.toLowerCase(), 'operate on resources')) {
231+
const headerString = `+++\ntitle = "${title}"\nweight = ${categoriesOrder[title.toLowerCase()] || 100}\n+++\n\n`;
232+
finalCategoryArr.header = headerString;
233+
}
234+
else {
235+
finalCategoryArr.header = '';
236+
}
231237

232238
let commandString = '';
233239
const formattedTitle = docs.title.replace(/\s+/g, '-')

0 commit comments

Comments
 (0)