Add (tint)

This commit is contained in:
2023-11-21 01:22:06 +08:00
parent e4bab8dcec
commit 84c68b2c0c
43 changed files with 257 additions and 143 deletions

View File

@@ -185,7 +185,6 @@ private static function setPostImage($post)
$image_content = $image_response->body();
// Get the size of the image content in KB
$imageSizeInKb = strlen($image_response->body()) / 1024;
@@ -194,12 +193,11 @@ private static function setPostImage($post)
continue;
}
$post_description = strtoupper(now()->format('j M')) . "" . $post->main_keyword . "" . markdown_min_read($post->body);
$post_description = strtoupper(now()->format('j M')).' • '.$post->main_keyword.' • '.markdown_min_read($post->body);
$image = ImageGen::getMainImage($image_content, 1007, 567);
$og_image = ImageGen::getOpenGraphImage($image_content, 1007, 567, $post->title, $post_description);
$epoch_now_timestamp = epoch_now_timestamp();
$filename = $post->slug.'-'.$epoch_now_timestamp.'.jpg';
$og_filename = $post->slug.'-'.$epoch_now_timestamp.'_og.jpg';

View File

@@ -51,9 +51,8 @@ public static function handle(NewsSerpResult $news_serp_result, $serp_counts = 1
// check timestamp
$serp_timestamp = Carbon::parse($serp_item->timestamp);
if(!$serp_timestamp->isBetween(now()->subHours(6), now()))
{
continue;
if (! $serp_timestamp->isBetween(now()->subHours(6), now())) {
continue;
}
/////
@@ -64,9 +63,6 @@ public static function handle(NewsSerpResult $news_serp_result, $serp_counts = 1
$skipItem = false;
foreach ($blacklist_domains as $domain) {
if (str_contains($serp_item->domain, $domain)) {
$skipItem = true;