Skip to content

blog列表获取的是空数组 #6

Description

@star176

读取博客列表通过fs.readdirSync(dirPath, { recursive: true });只能读取到目录文件夹,无法读取到目录下的文件
用glob会不会好一点 const files = glob.sync('**/*.{md,mdx}', { cwd: dirPath, absolute: true, });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions