diff --git a/scully/plugins/algolia.ts b/scully/plugins/algolia.ts index c9e48c45..3d438f17 100644 --- a/scully/plugins/algolia.ts +++ b/scully/plugins/algolia.ts @@ -71,7 +71,7 @@ const updateAlgoliaIndex = async (dom, options): Promise => { return dom; } try { - if (options.data.title !== 'metadata') { + if (options.data.title !== 'metadata' && options.data.published && !options.data.redirect) { const { window } = dom; const { document } = window; const mainTitle = document.querySelector('h1')?.innerHTML || ''; diff --git a/scully/plugins/sitemap/sitemap.ts b/scully/plugins/sitemap/sitemap.ts index 9b4f85ff..a048219f 100644 --- a/scully/plugins/sitemap/sitemap.ts +++ b/scully/plugins/sitemap/sitemap.ts @@ -138,9 +138,9 @@ export const sitemapPlugin = async (routes: Array): Promise routes.forEach((route: HandledRoute) => { if ( - config.ignoredRoutes && - (config.ignoredRoutes.includes(route.route) || - config.ignoredRoutesPattern.some((regExp) => regExp.test(route.route))) + route.data.redirect || + config.ignoredRoutes.includes(route.route) || + config.ignoredRoutesPattern.some((regExp) => regExp.test(route.route)) ) { return; }