From 05079e1edf3cfba6785de4379f0d3bb85b2450da Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Tue, 30 Jan 2024 17:52:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20add=20updatedAt=20variable=20to=20the=20?= =?UTF-8?q?article=20template=20to=20get=20the=20last=20u=E2=80=A6=20(#183?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: add updatedAt variable to the article template to get the last updated timestamp of the library item (#176) * fix: allow using image in the basic front matter settings (#187) --- src/settings/index.ts | 1 + src/settings/template.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/settings/index.ts b/src/settings/index.ts index 59cde7d..773e7a5 100644 --- a/src/settings/index.ts +++ b/src/settings/index.ts @@ -17,6 +17,7 @@ export const FRONT_MATTER_VARIABLES = [ 'read_length', 'state', 'date_archived', + 'image' ] export const DEFAULT_SETTINGS: OmnivoreSettings = { diff --git a/src/settings/template.ts b/src/settings/template.ts index 322f8c5..855fbae 100644 --- a/src/settings/template.ts +++ b/src/settings/template.ts @@ -77,6 +77,7 @@ export type ArticleView = state: string dateArchived?: string image?: string + updatedAt: string } | FunctionMap @@ -252,6 +253,7 @@ export const renderArticleContnet = async ( state: getArticleState(article), dateArchived: article.archivedAt, image: article.image, + updatedAt: article.updatedAt, ...functionMap, }