feat: support emitters defining external resources, emit link from contentindex directly
This commit is contained in:
parent
5a39719898
commit
5b13ff2199
8 changed files with 34 additions and 8 deletions
|
@ -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: () => [],
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue