Example using catch-all routes?
brycewray opened this issue · 0 comments
brycewray commented
This blog and your video about it were extremely helpful. However, I'm stuck on how to adapt this for use with a catch-all route --- such as /pages/posts/[...post].js
. I used fs-readdir-recursive
to see down within the levels of (e.g.) /posts/2019/02/post-1.md
, /posts/2020/02/post-2.md
, and so forth, but can't seem to get further. For one thing, it appears I need to do a JSON.stringify
to get past the array that comes from the [...post].js
file. By any chance, do you plan on creating an example that uses these catch-all routes with getStaticProps
and getStaticPaths
? Thanks.