bringyourownideas / laravel-sitemap

Simple crawler and sitemap generator for Laravel. No headless browser - just a crawler.
https://bringyourownideas.com/blog/simple-laravel-sitemap-generator
MIT License
9 stars 4 forks source link

Format issue? #1

Closed fabreg closed 4 years ago

fabreg commented 4 years ago

I tried on my Laravel 5.8 website. The sitemap.xml has been generated correctly but Google does not like it :) Then I generated the sitemap using xml-sitemap.com website and it worked. Seems like issue in format but not sure.

Schermata 2020-05-05 alle 14 26 02
spekulatius commented 4 years ago

Hello @fabreg

I just seen this - looks like I've missed this. As far as I know the sitemaps are correct. Can you share you sitemap.xml which was created (if still possible)?

Cheers, Peter

fabreg commented 4 years ago

Hello @spekulatius, I'm sorry I switched to another project, I couldn't wait so long :( and actually I don't have anymore the sitemap.xml generated.

spekulatius commented 4 years ago

Yeah, that's fair enough. Good luck with your project!

MichaelBelgium commented 4 years ago

This issue is still valid. Google Search Console is saying there are invalid dates.

 <url>
    <loc>-snip-</loc>
    <lastmod>2020-11-08T09:41:13</lastmod>
    <priority>0.8</priority>
    <changefreq>monthly</changefreq>
  </url>

It needs the timezone too so the correct format would be:

2020-11-08T09:41:13+01:00

Also when generating the priority was with a comma and it's required to be with a dot

spekulatius commented 4 years ago

Hey @MichaelBelgium

interesting, the issue doesn't happen for me - but I've still searched and found that my times already include a timezone value. I'll adjust this to ensure there is always a timezone set.

Thanks for bringing this back up!

Cheers, Peter

spekulatius commented 4 years ago

This should be fixed now.

spekulatius commented 4 years ago

Also when generating the priority was with a comma and it's required to be with a dot

I couldn't replicate this. PHP uses dot by default and the priority comes from number of "/" in the URL @MichaelBelgium

MichaelBelgium commented 4 years ago

Yes date is fixed now 👍

Also when generating the priority was with a comma and it's required to be with a dot

I couldn't replicate this. PHP uses dot by default and the priority comes from number of "/" in the URL @MichaelBelgium

Well example:

<url>
    <loc>-snip-</loc>
    <lastmod>2020-11-09T12:35:02+01:00</lastmod>
    <priority>0,9</priority>
    <changefreq>monthly</changefreq>
  </url>

I think it has to do with locale setting of the operating system, but it's not a big deal i guess

spekulatius commented 4 years ago

Yes date is fixed now +1

Also when generating the priority was with a comma and it's required to be with a dot

I couldn't replicate this. PHP uses dot by default and the priority comes from number of "/" in the URL @MichaelBelgium

Well example:

<url>
    <loc>-snip-</loc>
    <lastmod>2020-11-09T12:35:02+01:00</lastmod>
    <priority>0,9</priority>
    <changefreq>monthly</changefreq>
  </url>

I think it has to do with locale setting of the operating system, but it's not a big deal i guess

Cool, I didn't know you can do this. I'll make sure to run a replace.

spekulatius commented 4 years ago

Done @MichaelBelgium. Thanks for bringing this up! Are you using the package?

MichaelBelgium commented 4 years ago

Done @MichaelBelgium. Thanks for bringing this up! Are you using the package?

Yes i am, i can test it out

EDIT: it does

spekulatius commented 4 years ago

EDIT: it does

Sorry, I'm not sure what you mean here. Does it work for you now?

MichaelBelgium commented 4 years ago

EDIT: it does

Sorry, I'm not sure what you mean here. Does it work for you now?

Yes, i meant it is fixed/working

spekulatius commented 4 years ago

Awesome, great to hear it's working now! Again thanks for bringing it up - please raise issues for anything else you might notice @MichaelBelgium