We need to read some website configuration like website title, header infos etc. from json files residing in our nuxt-content folder. So far, we have been using a callOnce() function inside the App.vue, where we fetch the content using queryContent() and put them into a pinia store. However, during nuxt generate, this function is called once for every single route, resulting in a huge time loss.
Since the .json files don't change during generation, I wish to just read them once at server startup / before the generation and store the data into the pinia store.
Where is it best to do so? I can't find any place where I still have access to the nuxt context/app and things like queryContent.