Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If you're encountering issues with your sitemap in Google Search Console, #216

Open
Minsuchoi-1999 opened this issue Jan 4, 2024 · 0 comments

Comments

@Minsuchoi-1999
Copy link

Good afternoon,

If you're encountering issues with your sitemap in Google Search Console, I'd like to share a solution that might help.

Initially, I had a standard sitemap file. However, upon submitting it to Google Search Console, I received an error message stating that the sitemap file was invalid. Despite numerous attempts to address this @@issue, I finally found a solution.

If you're facing a similar problem, you might consider rewriting your sitemap.xml with the following code:

`

{% for post in site.posts %} {{ site.url }}{{ post.url | remove: 'index.html' }} {% endfor %}
{% for page in site.pages %}
{% if page.layout != nil %}
{% if page.layout != 'feed' %}
<url>
    <loc>{{ site.url }}{{ page.url | remove: 'index.html' }}</loc>
</url>
{% endif %}
{% endif %}
{% endfor %}

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant