feat: support emitters defining external resources, emit link from contentindex directly

This commit is contained in:
Jacky Zhao
2025-03-05 18:16:17 -08:00
parent 5a39719898
commit 5b13ff2199
8 changed files with 34 additions and 8 deletions

View File

@ -182,6 +182,20 @@ export const ContentIndex: QuartzEmitterPlugin<Partial<Options>> = (opts) => {
return emitted
},
externalResources: (ctx) => {
if (opts?.enableRSS) {
return {
additionalHead: [
<link
rel="alternate"
type="application/rss+xml"
title="RSS Feed"
href={`https://${ctx.cfg.configuration.baseUrl}/index.xml`}
/>,
],
}
}
},
getQuartzComponents: () => [],
}
}