related
related(pages=, page=?, indices=?, fragments=?, keywords=?, limit=?)Pages related to page among pages, best first, per the related config: indices limits the search to some indices, fragments adds heading ids to the fragments indices, keywords adds keywords by index name ({"tags": ["rust"]}), page=none searches the fragments and keywords alone. When a fragments index with applyFilter matched, each result’s fragments holds only the matched headings.
Arguments#
| Argument | Type | Required |
|---|---|---|
pages | array | yes |
page | page | no |
indices | array | no |
fragments | array | no |
keywords | map | no |
limit | int | no |
Details#
- Kind: Function, implemented by fugo.
- Available in: every kind of template: layouts, partials, shortcodes and render hooks.
- Output: escaped like any value, unless marked
safe. - Site-bound: reads the site or the page being rendered; in a component, pass
page=or declare@__nh.