tips

A collection of 2 post

Child pages with getStaticPaths() in Astro

How to create a child page with : Full code 1. What is ? Here is the description of getStaticPaths(): Because Astro is a static site builder it needs to know how to generate all the paths that are found in the app, to do this you need to export a function 2. What to write in ? An array with…

Get rid of long paths

Get rid of long paths If you are using paths and the project it’s getting bigger you might want to consider using absolute paths: create a .env file under the root directory of your node app: This way you’ll not have to worry again about ugly paths and you can move files within src folder freerly.