Where would be the best place, to scan for all availiable routes, by extending the metadata object within a page.tsx with a custom navigation object?
My idea is to build the navigation dynamically based on an object is exported within the metadata object:
/app/statistics/page.tsx
title: 'Stats',
navigation: {
name: 'Stats',
url: '/statistics',
icon: 'stats'
},
};```
I want this to work dynamically as I add pages, but not on every render. (Yes, the dynamic routes will be treated otherwise)