From b8760a2030a969727d400d5229b4bba5a9e95e42 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Tue, 4 Apr 2023 09:52:03 +0800 Subject: [PATCH] fix: make description available in the template --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 009ba4b..de637ae 100644 --- a/src/main.ts +++ b/src/main.ts @@ -327,6 +327,7 @@ export default class OmnivorePlugin extends Plugin { article.pageType === PageType.File ? await this.downloadPDF(article) : undefined, + description: article.description, }); const frontmatterRegex = /^(---[\s\S]*?---)/gm; // get the frontmatter from the content @@ -559,7 +560,7 @@ class OmnivoreSettingTab extends PluginSettingTab { href: "https://github.com/janl/mustache.js/#templates", }), fragment.createEl("p", { - text: "Available variables: id, title, omnivoreUrl, siteName, originalUrl, author, content, dateSaved, pdfAttachment, labels.name, highlights.text, highlights.highlightUrl, highlights.note, highlights.dateHighlighted, highlights.labels.name", + text: "Available variables: id, title, omnivoreUrl, siteName, originalUrl, author, content, description, dateSaved, pdfAttachment, labels.name, highlights.text, highlights.highlightUrl, highlights.note, highlights.dateHighlighted, highlights.labels.name", }), fragment.createEl("p", { text: "Please note that id in the frontmatter is required for the plugin to work properly.",