vinicius73 / SeoTools

Ferramentas de SEO para Laravel
MIT License
25 stars 8 forks source link

Sitemap #4

Open kadirarli opened 8 years ago

kadirarli commented 8 years ago

How to create sitemap.xml?

Can you explain?

sirketing-cto commented 8 years ago

routes.php

Route::get ('sitemap', function(){

    SEOSitemap::addRaw(
        array(
            'location'         => 'example.com',
            'last_modified'    => '2013-01-28',
            'change_frequency' => 'weekly',
            'priority'         => '0.65'
        )
    );
    SEOSitemap::addRaw(
      array(
          'location'         => 'example.com/test',
          'last_modified'    => '2013-12-28',
          'change_frequency' => 'weekly',
          'priority'         => '0.95'
      )
    );
    SEOSitemap::addRaw(
      array(
          'location'         => 'example.com/test/2',
          'last_modified'    => '2013-12-25',
          'change_frequency' => 'weekly',
          'priority'         => '0.99'
      )
    );
    SEOSitemap::addRaw(
        array(
              'location'         => '/sitemap-posts.xml',
              'last_modified'    => '2013-12-28',
              'change_frequency' => 'weekly',
              'priority'         => '0.95'
        )
    );

    //return $this->response($this->generator->generate());
return Response::make(SEOSitemap::generate(), 200, array('Content-Type' => 'text/xml'));

});

Page

ekran resmi 2015-11-10 16 12 11

I show this page. How can i create sitemap.xml like this page?

Thank u

sirketing-cto commented 8 years ago

I can't use sitemapRun file? How can i use?

vinicius73 commented 8 years ago

Currently I'm not giving full support to this package. Give preference to the artesaos/seotools At the moment he does not yet have support SiteMaps, but in the next few weeks this functionality will be added.

kadirarli commented 8 years ago

Ok. I find a method. Thank u for answer.