Skip to content

404 Page is included in the sitemap #38

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

Open
ineptian opened this issue Jul 27, 2022 · 0 comments
Open

404 Page is included in the sitemap #38

ineptian opened this issue Jul 27, 2022 · 0 comments

Comments

@ineptian
Copy link

Technically I don't think the 404 page should be included in the sitemap, but please correct me if I am wrong. I went ahead and added this in the sitemap to prevent it from showing up. Let me know if there is a better way to do it! Thanks!

        {% if '404' not in page.url %}
        <url>
            <loc>{{ absoluteUrl }}</loc>
            <lastmod>{{ page.date | htmlDateString }}</lastmod>
        </url>
        {% endif %}
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