Closed kunokdev closed 6 years ago
Hi @kunokdev I recommend you use a catchall route for this, like so:
routes.add('cmspage', '/:pageslug')
Then in getInitialProps you can use query.pageslug
to load the contents from the cms database.
Thanks, this will do!
Basically I am building small CMS and I am wondering if it would be possible to generate routes (ones inside
routes.js
) from database.