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

[Feature Request] Perform paging processing under multiple sources #265

Open
lxccc812 opened this issue Apr 12, 2024 · 2 comments
Open

[Feature Request] Perform paging processing under multiple sources #265

lxccc812 opened this issue Apr 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lxccc812
Copy link

lxccc812 commented Apr 12, 2024

First of all, thank you for your outstanding contribution.

I have a website with a large number of URLs, about 5,000. I use sitemaps: true to solve the pagination problem. Most of the time, he was able to address my needs. But when I use this method managing-sources, he will not paginate for me, no matter how many URLs there are, and The sitemaps:true functionality is missing.

When I have two sources of data in different categories, I want to be able to distinguish them. For example, I have the following source

sitemap: {
    xsl: false,
    sitemaps: {
        posts: {
            sources: [
                ['/api/food', { headers: { accept: 'application/json' } }],
                ['/api/car', { headers: { accept: 'application/json' } }],
                // and more...
            ],
        },
    },
    excludeAppSources: ['nuxt:pages'],
    cacheMaxAgeSeconds: 60 * 60 * 24, // 1 day
},

I hope to generate the following sitemap

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <script />
    <sitemap>
        <loc>http://localhost:3000/food-sitemap.xml</loc>
        <lastmod>2024-04-12T09:02:56Z</lastmod>
    </sitemap>
    <sitemap>
        <loc>http://localhost:3000/car-sitemap.xml</loc>
        <lastmod>2024-04-12T09:02:56Z</lastmod>
    </sitemap>
</sitemapindex>

Moreover, if there is too much data under http://localhost:3000/food-sitemap.xml, you can use sitemaps:true to paginate again.

@harlan-zw
Copy link
Collaborator

Thanks for the feature suggestion, I agree support for paginated named sitemaps is needed.

I don't currently have capacity to attempt this but will revisit when possible.

@harlan-zw harlan-zw added the enhancement New feature or request label Apr 24, 2024
@harlan-zw
Copy link
Collaborator

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

No branches or pull requests

2 participants