evidence.pages() returns only the pages the current viewer can open, so each viewer sees a menu built for them.
What evidence.pages() returns
await evidence.pages() resolves to an array of pages:
What’s in the list depends on where the page is viewed:
In published reports the list matches the sidebar: top-level pages and pages one folder deep. Pages nested deeper can still be opened but aren’t listed. With the CLI, deeper pages are listed under their top-level folder.
Always handle an empty list, so the block still renders something sensible.
Navigation Menu Grouped by Folder
Internal<a href> links route the same way as markdown links, so they work in published reports, the editor and the CLI.
Show a Section Only to Viewers Who Can Open It
Check the list before rendering a card. Here the Finance card only appears for viewers who can open at least one page in thefinance folder.
sales-reports with your project’s slug. Locally with the CLI, paths have no project prefix, e.g. /finance/.

