public function sitemap()
    {
        //Checks if the sitemap exist and is not expired
        if (is_readable(SITEMAP)) {
            $time = Time::createFromTimestamp(filemtime(SITEMAP));

            if (!$time->modify(getConfigOrFail('main.sitemap_expiration'))->isPast()) {
                $sitemap = file_get_contents(SITEMAP);
            }
        }

        if (empty($sitemap)) {
            $sitemap = gzencode(Sitemap::generate(), 9);

            (new File(SITEMAP, true, 0777))->write($sitemap);
        }

        return $this->response->withFile(SITEMAP);
    }