frouo/next-markdown

feat (advanced): allow to flatten some directories for docs / blog classification purpose

frouo opened this issue · 0 comments

frouo commented

Purpose

In some circumstances, you likely want to use subfolders to classify your markdown files. For example when writing docs.

So you want a way to bypass the default next-markdown dynamic routes.

Considered solution

✋ default dynamic routes MUST remain because it covers 99% of use cases. We all love how nextjs works with /pages. . Eg: path/to/projects.md will match /path/to/project.

We could have a .nextmd.config.json file at the root of a given folder to bypass how next-markdown will consider this folder's subfolders.

# .nextmd.config.json

{
  "flatten": ["examples", "features"]
}

image

Discussion

Tell me what you think in comment. Thanks