statamic / ssg

The official Statamic Static Site Generator
230 stars 23 forks source link

Custom route, external data source #19

Closed robbinjohansson closed 3 years ago

robbinjohansson commented 4 years ago

Yo,

is it possible to generate routes from slug using an external api as data source? I don't know what {slug} will be, since it's coming from an external source.

// routes/web.php

Route::statamic('product/{slug}', 'product.show');

If so, not sure how to define it in the config since I don't know the exact url that needs to be generated.

Thanks,