#How to debug all available dynamic routes in getStaticPaths?
13 messages · Page 1 of 1 (latest)
Hi @hollow anvil. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
You can browse the collection of Astro themes in the Astro Themes Catalog (https://astro.build/themes/). This catalog makes it easy to find themes for your next site and get started with a full-featured project from day one. For more information on themes and updates, you can refer to the Themes Catalog Updates blog post (https://astro.build/blog/themes-catalog-updates).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@hollow anvil kapa.ai is still learning and improving, please let us how it did by reacting below
how to get list of all available dynamic routes?
did i kill the ai or
@upper wagon How do I get the list of available dynamic routes in my site?
Let me check the knowledge base for you. One moment! :books:
To get a list of available dynamic routes in your Astro site, you can use the astro:build:done hook with the routes option. The routes option provides a list of all generated routes alongside their associated metadata. However, this list will be empty when using an SSR adapter.
Here's an example of how to use the astro:build:done hook:
// astro.config.mjs
export default {
plugins: [
{
name: 'my-plugin',
onBuild({ routes }) {
// routes is an array of RouteData objects
console.log(routes);
},
},
],
};
Keep in mind that the routes array will not include routes with **dynamic] and [...spread] params. For more information, refer to the [routes option section in the Astro Integration API documentation** (https://docs.astro.build/en/reference/integrations-reference#routes-option).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@hollow anvil kapa.ai is still learning and improving, please let us how it did by reacting below
@upper wagon lies: at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
The plugin "JavaScript plugins" was triggered by this import
node_modules/chevrotain/lib/src/scan/tokens.js:16:38:
16 │ var clone_1 = __importDefault(require("lodash/clone"));
╵ ~~~~~~~~~~~~~~
✘ [ERROR] Invalid command: on-resolve [plugin JavaScript plugins]
Let me check the knowledge base for you. One moment! :books: