I've this github package for my Laravel application, using composer, which creates sitemaps, but I am not able to understand where those sitemaps are rendered.
I had luck in finding the main sitemap after hitting /sitemap.xml URL location of my website, but I am unable to find other sitemaps like Google News sitemap one, which is supported by the package.
The responsible function seems this one, but my coding skills restrict me from understanding the rendered path:
/**
* Returns document with all sitemap items from $items array
*
* @param string $format (options: xml, html, txt, ror-rss, ror-rdf, google-news)
* @param string $style (path to custom xls style like '/styles/xsl/xml-sitemap.xsl')
*
* @return View
*/
public function render($format = 'xml', $style = null)
{
// limit size of sitemap
if ($this->model->getMaxSize() > 0 && count($this->model->getItems()) > $this->model->getMaxSize())
{
$this->model->limitSize($this->model->getMaxSize());
}
else if ('google-news' == $format && count($this->model->getItems()) > 1000)
{
$this->model->limitSize(1000);
}
else if ('google-news' != $format && count($this->model->getItems()) > 50000)
{
$this->model->limitSize();
}
$data = $this->generate($format, $style);
if ('html' == $format)
{
return $data['content'];
}
return $this->response->make($data['content'], 200, $data['headers']);
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire