getEntries
Read every node's content in reading order.
Walks the tree, reads every file, validates it, and applies the selected view. Entries come back in reading order, the same order as getFlatTree.
const entries = await docsTree.getEntries();
entries.map((entry) => `/docs/${entry._meta.slug}`);
Signature
tree.getEntries(options?: { view?: ViewName }): Promise<Array<Entry>>;
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
options.view | view name | no | "default" | A view declared in views. Unknown names throw |
Returns
Promise<Array<Entry>>, where Entry is the schema output, _meta (slug, fileName, filePath), resolved relations at the view's depth, and the awaited augment output. No children and no navigation data.
Order is depth-first: each node, then its children, following _order.json. Trees have no filter or sort.
Throws
Unknown view "<name>". Available views: <names>.- The walk errors listed on getTree.
- Getter option errors, validation, relation, and augment errors for any entry. See Errors.
See also
- getFlatTree for structure without validating bodies
- getEntry
- Views