Passing information to getStaticProps

Example of passing information to getStaticProps via dynamic routes

Routes processed by pages/posts/[id].js. The markdown files in folder pages/posts are read and displayed:

Example of passing information to getStaticProps via context

See file context. It will show the file names and an excerpt of the contents of the files in folder pages/posts.

See also