mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-06 08:52:47 +02:00
Use article content when resolving freshness content type
This commit is contained in:
committed by
GitHub
parent
9a056f6143
commit
1f73ded43f
@@ -580,7 +580,11 @@ export class DataListener extends BaseListener {
|
||||
const threshold = Settings.get<number>(SETTING_CONTENT_HEALTH_FRESHNESS_THRESHOLD) ?? 180;
|
||||
let freshnessWarning: { daysSince: number; threshold: number } | null = null;
|
||||
if (threshold > 0) {
|
||||
const article = { content: '', data: metadata, path: filePath } as ParsedFrontMatter;
|
||||
const article = {
|
||||
content: articleDetails.content || '',
|
||||
data: metadata,
|
||||
path: filePath
|
||||
} as ParsedFrontMatter;
|
||||
const contentType = await ArticleHelper.getContentType(article);
|
||||
const modifiedDateField = contentType.fields.find((field) => field.isModifiedDate);
|
||||
const publishDateField = contentType.fields.find((field) => field.isPublishDate);
|
||||
|
||||
Reference in New Issue
Block a user