From 54e722a55d58f4bab86184ffc970159628fa6967 Mon Sep 17 00:00:00 2001
From: freenandes <42041153+freenandes@users.noreply.github.com>
Date: Wed, 18 Oct 2023 02:43:41 +0000
Subject: [PATCH] docs: Update showcase.md (#540)
---
quartz/plugins/emitters/contentIndex.ts | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/quartz/plugins/emitters/contentIndex.ts b/quartz/plugins/emitters/contentIndex.ts
index 102394c..69d0d37 100644
--- a/quartz/plugins/emitters/contentIndex.ts
+++ b/quartz/plugins/emitters/contentIndex.ts
@@ -13,6 +13,7 @@
links: SimpleSlug[]
tags: string[]
content: string
+ richContent?: string
date?: Date
description?: string
}
@@ -53,7 +54,7 @@
<title>${escapeHTML(content.title)}</title>
<link>${root}/${encodeURI(slug)}</link>
<guid>${root}/${encodeURI(slug)}</guid>
- <description>${content.content}</description>
+ <description>${content.richContent ?? content.description}</description>
<pubDate>${content.date?.toUTCString()}</pubDate>
</item>`
@@ -67,9 +68,9 @@
<channel>
<title>${escapeHTML(cfg.pageTitle)}</title>
<link>${root}</link>
- <description>${!!limit ? `Last ${limit} notes` : "Recent notes"} on ${
- cfg.pageTitle
- }</description>
+ <description>${!!limit ? `Last ${limit} notes` : "Recent notes"} on ${escapeHTML(
+ cfg.pageTitle,
+ )}</description>
<generator>Quartz -- quartz.jzhao.xyz</generator>
${items}
</channel>
@@ -92,9 +93,10 @@
title: file.data.frontmatter?.title!,
links: file.data.links ?? [],
tags: file.data.frontmatter?.tags ?? [],
- content: opts?.rssFullHtml
+ content: file.data.text ?? "",
+ richContent: opts?.rssFullHtml
? escapeHTML(toHtml(tree as Root, { allowDangerousHtml: true }))
- : file.data.description ?? "",
+ : undefined,
date: date,
description: file.data.description ?? "",
})
--
Gitblit v1.10.0