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

Partial Scully runs with --routeFilter are not possible.. #9

Closed
michielkikkert opened this issue Jun 26, 2020 · 2 comments
Closed

Partial Scully runs with --routeFilter are not possible.. #9

michielkikkert opened this issue Jun 26, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@michielkikkert
Copy link

Hi!

Great plugin, I'd really like to use it. However, for my workflow I need to be able to do partial (or delta runs) of Scully. Basically I do a full run of Scully, but then, when for example only a single product in my DB updated, I run Scully with the --routeFilter argument to only regenerate that single route. The result of this is that - instead of the plugin only updating that entry in the sitemap, it re-creates the sitemap with just that single route inside.

So the request is, can the sitemap actually be based on scully.routes.json? This file stays in-tact, also after delta generation of Scully files.

@msacket
Copy link
Contributor

msacket commented Jun 26, 2020

Hi @MikeOne. Good idea. I'll see what we can do.

@msacket
Copy link
Contributor

msacket commented Jul 11, 2020

@MikeOne, I believe I have a solution ready to go. It utilizes a merge flag to cause the generated routes to be merged into the existing sitemap (if there is one). Otherwise, the file is overwritten (the default). If you think that'll work, I'll get it published.

const SitemapPlugin = getSitemapPlugin();
setPluginConfig(SitemapPlugin, {
    urlPrefix: 'https://gamma.stream',
    sitemapFilename: 'sitemap.xml',
    changeFreq: 'monthly',
    priority: ['1.0', '0.9', '0.8', '0.7', '0.6', '0.5', '0.4', '0.3', '0.2', '0.1', '0.0'],
    merge: false,
    ignoredRoutes: ['/404'],
    routes: {
        '/products/:productId': {
            changeFreq: 'daily',
            priority: '0.9',
            sitemapFilename: 'sitemap-products.xml',
            merge: true,
        },
    }
});

@msacket msacket self-assigned this Jul 12, 2020
@msacket msacket added the enhancement New feature or request label Jul 12, 2020
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