related

Signature
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#

ArgumentTypeRequired
pagesarrayyes
pagepageno
indicesarrayno
fragmentsarrayno
keywordsmapno
limitintno

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.

    Type to search titles, headings and text.