diff --git a/theme/src/node/prepare/prepareSidebar.ts b/theme/src/node/prepare/prepareSidebar.ts index fb844998..663e4f32 100644 --- a/theme/src/node/prepare/prepareSidebar.ts +++ b/theme/src/node/prepare/prepareSidebar.ts @@ -173,7 +173,7 @@ function getAutoDirSidebar( current.text = title } } - if (frontmatter.icon) { + if (frontmatter.icon && dir.endsWith('.md')) { current.icon = frontmatter.icon as ThemeIcon } if (parent?.items?.length) {