fix: type comparison

This commit is contained in:
bfahrenfort 2024-02-14 13:59:32 -06:00
parent 1b14e33bf1
commit 6424d28d05

View File

@ -120,7 +120,7 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
},
async emit(ctx, content, _resources) {
// If we're missing an index file, don't bother with sitemap/RSS gen
if (!(opts?.bypassIndexCheck || "index" in content.map((c) => c[1].data.slug!))) {
if (!(opts?.bypassIndexCheck || content.map((c) => c[1].data.slug!).includes("index" as FullSlug))) {
console.warn(
chalk.yellow(`Warning: contentIndex:
content/ folder is missing an index.md. RSS feeds and sitemap will not be generated.