preactjs/preact-cli

prerender urls for dynamic routes

Open

#1097 aperta il 31 mar 2020

Vedi su GitHub
 (14 commenti) (0 reazioni) (0 assegnatari)JavaScript (415 fork)batch import
feature requesthelp wanted

Metriche repository

Star
 (4674 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hello guys. I'm trying to create prerender-urls with some simple metadata for routes in my website, but looks like it's impossible now.

My prerender-urls.js looks like:

module.exports = function() {
  return [
    {
      url: "/",
      title: "Main page"
    },
    {
      url: "/catalog/:id",
      title: "Catalogue"
    }
  ];
};

But it is not working. My route in application also defined for path /catalog/:id. If i replace :id with some existing id for my catalog page, for example, 3031 it works as expected. How can I achieve this with preact-cli for dynamic urls? Thank you.

Guida contributor