Parametrized pages not found #1771
-
I am struggling with the implementation of the parametrized pages functionality. Following Parameterized routes instructions, I created a folder called "products" in my src file with a document named [product].md I further added the following to my config: However, the page doesn't get recognized as a parametrized page, i.e. I get an error "The current product is Would really appreciate it if anyone could point me towards what went wrong here. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I’m not able to reproduce this error. What version of Framework are you using? Parameterized routes were added in 1.11.0, and the latest release is currently 1.12.0. To test, I created a new project with the following structure:
In observablehq.config.js: export default {
root: "src",
dynamicPaths: ["/products/100736", "/products/100739"]
}; In src/products/[product].md: The current product is ${observable.params.product}. Running
If you can share more details about your setup or a reproduction, I’d be happy to take another look. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot - the version I had been running was too old, I hadn't noticed that this feature has only been introduced that recently. After updating its working! Sorry for bothering you and thanks for the quick answer! |
Beta Was this translation helpful? Give feedback.
Thanks a lot - the version I had been running was too old, I hadn't noticed that this feature has only been introduced that recently. After updating its working! Sorry for bothering you and thanks for the quick answer!