Skip to content

Commit 3b0708b

Browse files
authored
Merge pull request #8629 from ethereum/updateMarkdownChecker
Update markdown checker script
2 parents bb7a4f4 + b5e3018 commit 3b0708b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/scripts/markdown-checker.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ function processFrontmatter(path, lang) {
111111
)
112112
}
113113

114+
if (frontmatter.sidebar) {
115+
console.error(`Unexpected 'sidebar' frontmatter at ${path}`)
116+
}
117+
114118
if (path.includes("/tutorials/")) {
115119
if (!frontmatter.published) {
116120
console.warn(`Missing 'published' frontmatter at ${path}:`)
@@ -130,6 +134,12 @@ function processFrontmatter(path, lang) {
130134
)
131135
}
132136
}
137+
138+
if (!["beginner", "intermediate", "advanced"].includes(frontmatter.skill)) {
139+
console.log(
140+
`Skill frontmatter '${frontmatter.skill}' must be: beginner, intermediate, or advanced at: ${path}:`
141+
)
142+
}
133143
}
134144
}
135145

0 commit comments

Comments
 (0)