public static function homePage()
    {
        if (!class_exists('SiteTree') || self::$site_home) {
            return self::$site_home;
        }

        $home = null;

        if (class_exists('HomePage')) {
            $home = DataList::create('HomePage')->first();
        }

        if (!$home) {
            $home = \SiteTree::get_by_link(\RootUrlController::get_homepage_link());
        }

        if (!$home) {
            $home = DataList::create('Page')->first();
        }

        self::$site_home = $home;

        return $home;
    }