question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

prerender urls for dynamic routes

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rschristiancommented, Oct 6, 2022

I do not. As I said though, above there’s some discussion on how you may set this up.

Config depends heavily on your hosting method of choice.

0reactions
saurabhck12commented, Oct 6, 2022

Thanks @rschristian. This is helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pre-render Dynamic Routes with Next.js | by Kevin Tomas
In this blog post you will learn how to pre-render sites with dynamic routes with NextJS in combination with MongoDB.
Read more >
Dynamic Routes | Learn Next.js
We want the URL for these pages to depend on the blog data, which means we need to use dynamic routes. What You'll...
Read more >
How to prerender dynamic routes in angular
To prerender these kinds of dynamic routes, follow this approach. 1. Go to your server.ts file and add following async functions. async function ......
Read more >
Prerender support for dynamic URLs - RedwoodJS Community
I've been looking in to the prerender option for Routes and it seems to check everything I need except for being available for...
Read more >
Routing in Next.js – How to Set Up Dynamic Routing with Pre ...
getStaticProps() utilizes the static-site generation concept. So Next.js will pre-render the respective page at build time. In the case of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found