我有一个帖子目录,如:
src
-posts
-post-a
index.md
demo.jpg
-post-b
index.md
logo.jpg
-pages
index.js
// ...
Run Code Online (Sandbox Code Playgroud)
我想让目录名 post-a/post-b 作为 index.md 的 id,我该怎么做?
这是我的gatsby-config.js:
src
-posts
-post-a
index.md
demo.jpg
-post-b
index.md
logo.jpg
-pages
index.js
// ...
Run Code Online (Sandbox Code Playgroud)

但allMarkdownRemark.edges.node没有目录信息。
我想在提交之前检查打字稿类型,所以我使用tsc --noEmit $(changedFile). 但是,该命令不能指定config文件。
我找到了--project选项,但是这个选项会检查整个项目,我只想检查changedFile,因为有些old files有类型错误但不需要处理。
那么我怎样才能changedFile在提交之前只检查类型呢?