fix news,
This commit is contained in:
@@ -86,12 +86,12 @@ class BlogPostModel {
|
||||
}
|
||||
}
|
||||
|
||||
// Extract excerpt from blogIntro or metaDescription
|
||||
final excerpt = blogIntro ?? metaDescription ?? '';
|
||||
|
||||
// Use content_html preferentially, fall back to content
|
||||
final htmlContent = contentHtml ?? content;
|
||||
|
||||
// Excerpt is ONLY from blog_intro (plain text)
|
||||
final excerpt = blogIntro ?? '';
|
||||
|
||||
// Use meta image with full URL path
|
||||
String imageUrl;
|
||||
if (metaImage != null && metaImage!.isNotEmpty) {
|
||||
@@ -117,7 +117,9 @@ class BlogPostModel {
|
||||
return NewsArticle(
|
||||
id: name,
|
||||
title: title,
|
||||
excerpt: excerpt.length > 200 ? '${excerpt.substring(0, 200)}...' : excerpt,
|
||||
excerpt: excerpt.isNotEmpty
|
||||
? (excerpt.length > 300 ? '${excerpt.substring(0, 300)}...' : excerpt)
|
||||
: 'Không có mô tả',
|
||||
content: htmlContent,
|
||||
imageUrl: imageUrl,
|
||||
category: category,
|
||||
|
||||
Reference in New Issue
Block a user