Remove support for miniTocMaxHeadingLevel (#34758)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user