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

Sub-sitemaps as object #140

Open
mtscarvalho opened this issue Mar 19, 2024 · 1 comment
Open

Sub-sitemaps as object #140

mtscarvalho opened this issue Mar 19, 2024 · 1 comment

Comments

@mtscarvalho
Copy link

In certain multilingual websites, we utilize a sitemap containing an index of sub-sitemaps. For example:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
        <loc>https://mysite.com/en/sitemap.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://mysite.com/pt-br/sitemap.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://mysite.com/es/sitemap.xml</loc>
    </sitemap>
</sitemapindex>

Is there a method to access these sub-sitemaps individually rather than retrieving all links collectively?

@sebi75
Copy link

sebi75 commented Apr 23, 2024

In certain multilingual websites, we utilize a sitemap containing an index of sub-sitemaps. For example:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
        <loc>https://mysite.com/en/sitemap.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://mysite.com/pt-br/sitemap.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://mysite.com/es/sitemap.xml</loc>
    </sitemap>
</sitemapindex>

Is there a method to access these sub-sitemaps individually rather than retrieving all links collectively?

Hey @mtscarvalho! I am building a package inspired by this one, but relying on the newer fast-xml-parser and fewer dependencies, and I would be happy to add such a method to it.
You can check it out here https://github.com/sebi75/lightweight-sitemapper

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

2 participants