Skip to content

Commit d4c48a0

Browse files
committed
Update helper function loadSingleSidebar to omit subfolders
1 parent b7fdc57 commit d4c48a0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/vuepress/config/sidebar/utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ function loadSidebarFromWithPath({ location, title, titlePath, pre }) {
6464
function loadSingleSidebar({ title, titlePath, location }) {
6565
const children = fs
6666
.readdirSync(location)
67+
.filter((child) => !fs.statSync(path.join(location, child)).isDirectory())
6768
.map((child) => child.replace(/\.md$/, ""))
68-
.filter((child) => child !== "img")
69-
.filter((child) => child !== "files")
7069
.filter((child) => child !== "README")
7170
.map((child) => {
7271
let title = child.replace(/_/g, " ");

0 commit comments

Comments
 (0)