$site->index()

Creates a $pages collection with every page and subpage in /content. This will walk the entire file tree.

  • return ($pages)
// goes through any subpage, subsubpage, etc. below $page and returns them by template
$articles = $site->index()->filterBy('template', 'article');

// the index method is also perfect for a site-wide search
$results = $site->index()->search('mysearchword');

Is something missing or incorrect? Edit this page on Github…