1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Remove support for miniTocMaxHeadingLevel (#34758)

This commit is contained in:
Hector Alfaro
2023-02-17 11:29:02 -05:00
committed by GitHub
parent 7800cfa2fc
commit 4cd28fd735
346 changed files with 146 additions and 428 deletions

View File

@@ -42,7 +42,9 @@ export const schema = {
showMiniToc: {
type: 'boolean',
},
// This frontmatter property is deprecated. Despite what `miniTocMaxHeadingLevel` says, the max level of mini TOC is *always* 2. See github/docs-engineering#2701.
miniTocMaxHeadingLevel: {
deprecated: true,
type: 'number',
default: 2,
minimum: 2,
@@ -237,6 +239,11 @@ export const schema = {
},
}
// returns a list of deprecated properties
export const deprecatedProperties = Object.keys(schema.properties).filter((prop) => {
return schema.properties[prop].deprecated
})
const featureVersionsProp = {
feature: {
type: ['string', 'array'],
@@ -266,7 +273,7 @@ schema.properties.versions = {
}, featureVersionsProp),
}
function frontmatter(markdown, opts = {}) {
export function frontmatter(markdown, opts = {}) {
const defaults = {
schema,
validateKeyNames: true,