preactjs/preact-cli

prerender urls for dynamic routes

Open

#1,097 opened on 2020年3月31日

GitHub で見る
 (14 comments) (0 reactions) (0 assignees)JavaScript (4,674 stars) (415 forks)batch import
feature requesthelp wanted

説明

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.

コントリビューターガイド