You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine you'd like to create a new page for each .json file in a directory. This would allow you to e.g. iterate over .json files and import/read them in one go without doing it in getStaticProps.
In Gatsby, you have something like createPage function.
This discussion was converted from issue #14491 on June 23, 2020 12:05.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are only discussions about this but I couldn't find actual feature request issue.
#11272
#10977
#11370
Imagine you'd like to create a new page for each .json file in a directory. This would allow you to e.g. iterate over .json files and import/read them in one go without doing it in getStaticProps.
In Gatsby, you have something like
createPage
function.Consider this example:
https://github.com/benawad/test-nextjs-blog/blob/master/pages/blog/%5Bslug%5D.js#L20-L51
Beta Was this translation helpful? Give feedback.
All reactions