Skip to content

Commit

Permalink
fix: add updatedAt variable to the article template to get the last u… (
Browse files Browse the repository at this point in the history
omnivore-app#183)

* fix: add updatedAt variable to the article template to get the last updated timestamp of the library item (omnivore-app#176)

* fix: allow using image in the basic front matter settings (omnivore-app#187)
  • Loading branch information
sywhb authored Jan 30, 2024
1 parent a21d8c5 commit 05079e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const FRONT_MATTER_VARIABLES = [
'read_length',
'state',
'date_archived',
'image'
]

export const DEFAULT_SETTINGS: OmnivoreSettings = {
Expand Down
2 changes: 2 additions & 0 deletions src/settings/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export type ArticleView =
state: string
dateArchived?: string
image?: string
updatedAt: string
}
| FunctionMap

Expand Down Expand Up @@ -252,6 +253,7 @@ export const renderArticleContnet = async (
state: getArticleState(article),
dateArchived: article.archivedAt,
image: article.image,
updatedAt: article.updatedAt,
...functionMap,
}

Expand Down

0 comments on commit 05079e1

Please sign in to comment.