mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 23:15:46 -05:00
fix: type comparison
This commit is contained in:
parent
1b14e33bf1
commit
6424d28d05
@ -120,7 +120,7 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
|
|||||||
},
|
},
|
||||||
async emit(ctx, content, _resources) {
|
async emit(ctx, content, _resources) {
|
||||||
// If we're missing an index file, don't bother with sitemap/RSS gen
|
// 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(
|
console.warn(
|
||||||
chalk.yellow(`Warning: contentIndex:
|
chalk.yellow(`Warning: contentIndex:
|
||||||
content/ folder is missing an index.md. RSS feeds and sitemap will not be generated.
|
content/ folder is missing an index.md. RSS feeds and sitemap will not be generated.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user