diff --git a/src/Roots/Acorn/Sage/Concerns/FiltersTemplates.php b/src/Roots/Acorn/Sage/Concerns/FiltersTemplates.php index f5055562..e01f5c72 100644 --- a/src/Roots/Acorn/Sage/Concerns/FiltersTemplates.php +++ b/src/Roots/Acorn/Sage/Concerns/FiltersTemplates.php @@ -35,6 +35,12 @@ public function filterTemplateHierarchy($files) $templates = array_diff($templates, $pages); } + if (($index = array_search('index.php', $files)) !== false) { + unset($files[$index]); + + $templates[] = 'index.php'; + } + return [...$pages, ...$files, ...$templates]; } diff --git a/src/_ide-helpers.php b/src/_ide-helpers.php index 2bf68478..2877798f 100644 --- a/src/_ide-helpers.php +++ b/src/_ide-helpers.php @@ -9,7 +9,5 @@ * * @codeCoverageIgnore */ - class View - { - } + class View {} }