Runtime generation of routes #1919
-
Hi, Is it possible to generate a new route at runtime and mount it? When my program is first ran, I would like to read blog posts from a database, generate routes for each of them, and mount them. Mounting is straightforward but I can't seem to generate the functions for the routes because it seems that procedural macros aren't allowed on functions in functions. For instance, this doesn't work:
I previously simply had a single route for the blog posts with a dynamic url so that when they visited a page, it would show the correct one based on the url. These pages seem to not get caught by google though, so I figured I should make each of them actual routes, so they get picked up for SEO. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The mounting of routes shouldn't effect SEO at all, since google shouldn't be able to tell how you mounted them. You likely have a different issue that's preventing Google from recommending your blog posts. |
Beta Was this translation helpful? Give feedback.
The mounting of routes shouldn't effect SEO at all, since google shouldn't be able to tell how you mounted them.
You likely have a different issue that's preventing Google from recommending your blog posts.