The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(rss): configurable RSS feed URL (#1806)

* feat(rss): configurable RSS feed URL

* Update docs/features/RSS Feed.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/features/RSS Feed.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>

authored by

Emile Bangma
Copilot
Jacky Zhao
and committed by
GitHub
c6f10b44 b050162f

+9 -1
+5
docs/features/RSS Feed.md
··· 1 1 Quartz emits an RSS feed for all the content on your site by generating an `index.xml` file that RSS readers can subscribe to. Because of the RSS spec, this requires the `baseUrl` property in your [[configuration]] to be set properly for RSS readers to pick it up properly. 2 2 3 + > [!info] 4 + > After deploying, the generated RSS link will be available at `https://${baseUrl}/index.xml` by default. 5 + > 6 + > The `index.xml` path can be customized by passing the `rssSlug` option to the [[ContentIndex]] plugin. 7 + 3 8 ## Configuration 4 9 5 10 This functionality is provided by the [[ContentIndex]] plugin. See the plugin page for customization options.
+1
docs/plugins/ContentIndex.md
··· 17 17 - `enableRSS`: If `true` (default), produces an RSS feed (`index.xml`) with recent content updates. 18 18 - `rssLimit`: Defines the maximum number of entries to include in the RSS feed, helping to focus on the most recent or relevant content. Defaults to `10`. 19 19 - `rssFullHtml`: If `true`, the RSS feed includes full HTML content. Otherwise it includes just summaries. 20 + - `rssSlug`: Slug to the generated RSS feed XML file. Defaults to `"index"`. 20 21 - `includeEmptyFiles`: If `true` (default), content files with no body text are included in the generated index and resources. 21 22 22 23 ## API
+3 -1
quartz/plugins/emitters/contentIndex.ts
··· 25 25 enableRSS: boolean 26 26 rssLimit?: number 27 27 rssFullHtml: boolean 28 + rssSlug: string 28 29 includeEmptyFiles: boolean 29 30 } 30 31 ··· 33 34 enableRSS: true, 34 35 rssLimit: 10, 35 36 rssFullHtml: false, 37 + rssSlug: "index", 36 38 includeEmptyFiles: true, 37 39 } 38 40 ··· 151 153 await write({ 152 154 ctx, 153 155 content: generateRSSFeed(cfg, linkIndex, opts.rssLimit), 154 - slug: "index" as FullSlug, 156 + slug: (opts?.rssSlug ?? "index") as FullSlug, 155 157 ext: ".xml", 156 158 }), 157 159 )