Skip to content

Commit

Permalink
fix: make description available in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
sywhb committed Apr 4, 2023
1 parent bed8835 commit b8760a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.",
Expand Down

0 comments on commit b8760a2

Please sign in to comment.