Skip to content

Commit

Permalink
add support for unlisted docs in front matter (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmason2-godaddy authored Sep 25, 2024
1 parent 0b1e369 commit 71e69a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/generate-docs-index/utils/add-front-matter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const frontMatterConfig = {
'upgrades.md': {
sidebar_position: 6
},
'upgrade-to-6.md': {
unlisted: true
},
'upgrade-to-7.md': {
sidebar_position: 7
},
Expand Down Expand Up @@ -62,6 +65,7 @@ export default function addFrontMatter(content, filename) {
const frontMatter = {
title: `''`, // empty title to remove redundant title
hide_title: true,
unlisted: frontMatterConfig[filename]?.unlisted || false, // ability to hide from sidebar
sidebar_label: frontMatterConfig[filename]?.label || `${formatFilename(filename)}`,
sidebar_position: frontMatterConfig[filename]?.sidebar_position || 50
};
Expand Down

0 comments on commit 71e69a1

Please sign in to comment.